Avatar of mrong
mrong
 asked on

How to export data(from select stmt) into an Excel

Greeting,
I have select stmt in oracle which return me over 20K records. I want to export them into an Excel sheet.

Thanks in advance.
Oracle Database

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
mrong

ASKER
slightwv:
I tried your suggestion and the columns in the Excel sheet are all merged.
Anyway to fix it?
thanks.
slightwv (䄆 Netminder)

Did you open Excel and import the file and specify it was Comma Delimited?
mrong

ASKER
how to specify it is Comma Delimited?
thanks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
slightwv (䄆 Netminder)

File Open?

Under the file type drop down select "Text Files".

Then follow the Wizard.  Delimited, comma, finish.

The exact menu choices change from version to version but the concepts stay the same.

http://www.brighthub.com/computing/windows-platform/articles/10782.aspx
mrong

ASKER
some of our records contains comma, the it splits them in different columns. how to avoid it?
thanks.
slightwv (䄆 Netminder)

Delimit by some other character not allowed in the data.  Is a '|' allowed?

for example:  col1|col2|col3,and some text|col5

or add some enclosing character like a double quote (or some other character not allowed in the text).  Depending on your Excel version this is called the Text Qualifier.

for example:
col1,col2,"col3,and some text",col4
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
mrong

ASKER
Say I have desc field below which contains comma and want to add enclosing double quote to it.
how to change it?

Select ID||','||desc||','||name
from table1
where.....
SOLUTION
MikeOM_DBA

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
slightwv (䄆 Netminder)

>>Select ID||','||desc||','||name

Just add them to the string concatination.

Select '"' || ID||'","'||desc||'","'||name || '"'