System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

copy sql table with its contents to excel sheet

syedar
Advisor

copy sql table with its contents to excel sheet

Hi all,

On HP-UX, how can i copy oracle sql table data to excel sheet in tab or comma seperated.

Thanks.
4 REPLIES
Hein van den Heuvel
Honored Contributor

Re: copy sql table with its contents to excel sheet

Hmm, what is the relevance of HPUX in this query? Isn't this 99.9% an Oracle question based asked in an Oracle forum (after researching whether such a general undetailed question has been posted and answered already.

The answer may be as simple as just use SQLplus and 'SET COLSEP ","' before a 'SELECT * FROM '. Please try.

If that does not solve the problem, them please re-reply with an EXACT definition why not, perhaps with a few rows of sample input and output data attached as a TEXT file.

You may need manual formatting line
SELECT || "," || || "," ...

But before working too hard, please be sure to GOOGLE for +ORACLE +"TO CSV"
You'll find tools like: tabexp (material dreams)

hth,
Hein van den Heuvel
HvdH Performance Consulting
OldSchool
Honored Contributor

Re: copy sql table with its contents to excel sheet

of course, there is always ODBC which would allow excel to access the db directly.
NewPleaseHelp00110011
Occasional Visitor

Re: copy sql table with its contents to excel sheet

how do you set up an ODBC connection in Excel to a QC Database?
OldSchool
Honored Contributor

Re: copy sql table with its contents to excel sheet

details vary by the back-end database. I know zero about QC, but from the prior posts in the other thread, I'm guessing its MS SQL. You need the appropriate ODBC driver for whatever DB it is.

Once it's installed / configured, in Excel you go to "Data -> Get External Data -> New Query"

google (or whatever) "sql odbc driver" should get you tons of relevant links.