Home » RDBMS Server » Server Utilities » producing flat file from Oracle - please help..
producing flat file from Oracle - please help.. [message #69249] Wed, 28 November 2001 17:30 Go to next message
C. Taslim
Messages: 1
Registered: November 2001
Junior Member
hi..I'm using SQL PLus to produce a flat file to be used by other applications.
my codes are as follows:

SQL> SET ECHO OFF
SQL> SET FEEDBACK OFF
SQL> SET HEADING OFF
SQL> SET LINESIZE 10000
SQL> SET PAGESIZE 0
SQL> SET SPACE 0
SQL> SET TERMOUT OFF
SQL> SET TIMING OFF
SQL> SET TRIMSPOOL ON
SQL> SET VERIFY OFF
SQL> spool 11.txt
SQL> SELECT '041' || ',' ||
2 prd_lvl_child || ',' ||
3 prd_lvl_number
4 from prdmstee
5 where prd_lvl_id = 4
6 /

The following is my output in the flat file (ie 11.txt)
SQL> SELECT '041' || ',' ||
2 prd_lvl_child || ',' ||
3 prd_lvl_number
4 from prdmstee
5 where prd_lvl_id = 4
6 /
041,797,1
041,798,2
041,799,3
041,800,4
041,801,5
041,802,6
041,803,7
041,804,8
041,805,9
041,806,10
041,1505,Sub100
SQL> spool off

My question is, how do I remove my codes so that I get only the data in my flat file output (ie 11.txt)

Thank you very much for the assistance...
C. Taslim

----------------------------------------------------------------------
Re: producing flat file from Oracle - please help.. [message #69253 is a reply to message #69249] Thu, 29 November 2001 06:22 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
save your query in file and execute.
ex:
spool 11.txt
select * from tablename;
spool off

----------------------------------------------------------------------
Previous Topic: inserting xml data into oracle relational tables.
Next Topic: List of functions in a package..
Goto Forum:
  


Current Time: Fri Mar 29 09:21:48 CDT 2024