Re: exporting a table to a flat file in .csv format
From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Tue, 26 Aug 2003 11:09:40 -0700
Message-ID: <3F4BA264.6C606A95_at_exxesolutions.com>
Date: Tue, 26 Aug 2003 11:09:40 -0700
Message-ID: <3F4BA264.6C606A95_at_exxesolutions.com>
Jon wrote:
> I am trying to dump data from a table to a flat file in .csv format. I have
> read documentation for sqlplus utility but I have not seen any information
> about this apart from defining specific format for columns. Do you know if
> this is posible from sqplus?
>
> Thanks
Simple ...
SELECT field1 || ',' || field2 || ',' || field3 FROM table;
Use TO_CHAR to handle any numbers or dates that need to be converted to strings for concatenation.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp http://www.outreach.washington.edu/extinfo/certprog/aoa/aoa_main.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Aug 26 2003 - 20:09:40 CEST