Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Create flat file with Oracle SQL*Plus (Read 6949 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Create flat file with Oracle SQL*Plus
19.09.06 at 16:00:01
 
Create flat file with Oracle SQL*Plus
 
To create a flat file with Oracle SQL*Plus you can use the spool command. However it requires a little knowledge of the SQL*Plus commands to get exactly the information in the file that is required. As of standard SQL*Plus will repeat the query being executed, display a feedback line and column titles. If none of that is required and ONLY the data is required to be put in the text file the following command file can be used.
 
Type the following commands in a plain text file and call it test.sql
Code:
SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET HEADING OFF

spool output.txt;

select sysdate from dual;

spool off;
 


 
To run this command type this command in SQL*Plus:
@run
 
Now inspect the file output.txt the command produced. Only the data is sent to the file and nothing else!
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1