Thursday, July 3, 2008

Loading data into text file from Oracle

set colsetp,
set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on
spool oradata.txt
SELECT col1  ','  col2  ','  col3
FROM tab1
WHERE col2 = 'XYZ';
spool off

No comments: