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:

  1. Anonymous3:15 AM

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

    regards,

    mohk

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

    -kris

    ReplyDelete
  3. 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.

    ReplyDelete
  4. Anonymous10:45 AM

    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.

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

    ReplyDelete
  6. Anonymous12:41 PM

    Thanks, Kris. It works now.

    ReplyDelete