SQL Plus was originally a reporting utility. Unfortunately, it is the only tool provided
by Oracle for generating flat files. To remove the 'friendly' formatting, here
are the commands required:
set echo off
set newpage 0
set pagesize 0
set space 0
set feedback off
set trimspool on
set heading off
set linesize 555
-- Then, to create a flat file, with pipe delimiters:
spool invoices.dat;
select invoice_id || '|' ||
invoice_dt || '|' ||
total_amt
from invoices
order by invoice_id
;
spool off;
exit
|
|