Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Outputting a table/recordset to a csv
Forgive the beginner's Q... trawled Google groups and got this far (below),
but it doesn't work. I'm just trying to output a recordset to a text file.
Ideally, I'd like the whole table but the examples that turned up specified
the column names.
Anyone care to point out the stupid mistake(s) I'm making? I've no idea what the first seven lines do, BTW. Thanks.
set space 0;
set feedback off;
set pagesize 0;
set heading off;
set linesize 1000;
set echo off;
set termout off;
spool "C:\temp.csv";
select st_site_id || ',' || ow_owner_id || ',' || hsg_assessment_date from hsg146;
spool off;
-- Aidan Whitehall <aidanwhitehall_at_fairbanks.co.uk> Macromedia ColdFusion Developer Fairbanks Environmental +44 (0)1695 51775Received on Mon Oct 21 2002 - 11:44:54 CDT