Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle exporting comma separated values (csv)

Status
Not open for further replies.

luvcal

Programmer
Aug 10, 2001
54
US
Is there any way to export data in a comma separated format?
 
Try:

SELECT MyField1 || "," || MyField2
FROM MyTable; Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Thanks for the reply. What I really need is a way to export to a file (*.csv) in the comma separated format. I don't know if the EXPORT utility has this functionality or if there is another tool that is relevent.
 
Maybe I am missing something completely. If you do the following, you will have a file in the comma separated format:

SET ECHO OFF;
SET HEAD OFF;
SET FEEDBACK OFF;
SET PAGES 9999
SET LINES 999; -- Make this as wide as your data is
SPOOL C:\MyDir\Data.CSV

SELECT MyField1 || "," || MyField2
FROM MyTable;

SPOOL OFF
SET LINES 80;
SET PAGES 50;
SET ECHO ON;
SET HEAD ON;
SET FEEDBACK ON;

If you are asking if there is a way to do this for every table in a schema through the EXPORT utility, I have never heard of one... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top