Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





Oracle » PL-SQL » SQL-Plus » Extract-File-Ou

Formatting Records for Output Files in SQL-Plus

     


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











Oracle : Related Topics

Oracle : PL-SQL : Editing SQL within SQL-Plus
Oracle : PL-SQL : Passing parms to a SQL script via SQL-Plus

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.