Forum Stats

  • 3,814,871 Users
  • 2,258,922 Discussions
  • 7,892,882 Comments

Discussions

How to save a query result and export it to, say excell?

513756
513756 Member Posts: 188
edited Sep 10, 2008 1:21AM in SQL & PL/SQL
Hi,
I have a oracle 10g database running on a rh linux e3 server.

I have generated a query, but I don't know could I save the result in the db? Could I export the result to other applications, like excel?

Thanks a lot!

Qian
Tagged:

Comments

  • Etbin
    Etbin Member Posts: 8,968 Gold Crown
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:68212348056

    Regards

    Etbin
  • 418781
    418781 Member Posts: 55
    How about using SQL Developer. It has options on result set to export in various format.
  • Hi all,

    Even in TOAD you have options to export !
  • 628524
    628524 Member Posts: 115
    SPOOL A
    <<Your select statement goes here>>
    SPOOL OFF

    You can either save this spool file or this a.lst can be opened in excel easily.


    -MS
  • BluShadow
    BluShadow Member, Moderator Posts: 41,866 Red Diamond
    SPOOL A
    <<Your select statement goes here>>
    SPOOL OFF

    You can either save this spool file or this a.lst can be opened in excel easily.
    Well it can, but it wouldn't be nicely formatted as, based on your example, there would be lots of header rows and a copy of the query as well.

    A search on this forum for something like "export data to excel" will yield plenty of valid examples.
  • Marwim
    Marwim Member Posts: 3,649 Gold Trophy
    edited Sep 10, 2008 1:21AM
    Hello Qian,

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:728625409049
    http://matzberger.de/oracle/spreadsheet-en.html
    http://wiki.oracle.com/thread/1227569/Output+to+a+csv+file?t=anon
    http://radio.weblogs.com/0137094/2006/10/26.html
    http://spendolini.blogspot.com/2006/04/custom-export-to-csv.html
    http://sanjeev-oracle-world.blogspot.com/2007/06/create-excel-workbook-by-plsql-code.html
    http://www.rci-informatique.fr/rxls (french)

    There should be at least one that fits your needs ;-)

    Regards
    Marcus
This discussion has been closed.