Pages

Thursday, May 03, 2007

csv with sqldeveloper

Laurent shows how to format a select * into csv.


Give this a try in sqldeveloper, simply add a comment in the select and it's csv. See this:

6 comments:

Anonymous said...

That is very interesting. But how can I use this functionality to export the resulting CSV content to a file?

regards,

mohk

Kris Rice said...

You could copy/paste from the script output or use the run instead of run script then right click and choose Export->CSV.

-kris

Sunil said...

Just one catch ..

The data i had was Japanese characters and they were getting goofed up, even if my O/s was japanese.

PL/SQL developer on Jap O/S was able to do it just fine.

ked said...

I just downloaded SQL Developer (version 1.1.3 Build Main-27.66). I don't get CSV output as you show when using /*csv*/ comment. Is there any option to set? Thanks.

Kris Rice said...

That's all but you have to run a a script, the second icon or F5.

ked said...

Thanks, Kris. It works now.