Home » Infrastructure » Unix » Unix Job to dump a query result to a flat file
Unix Job to dump a query result to a flat file [message #185664] Wed, 02 August 2006 23:52 Go to next message
prashu
Messages: 1
Registered: July 2006
Junior Member
Hi All,

I have a UNIX job(shown below) which connects to Oracle database and fires a select query(mn_part1.sql file has the query) to fetch some rows from a table based on a search criteria. I want this query result to be directed to a flat file (.dat). how do i do this?

${UTLLIB}batch_sqlplus ${ThisJob} ${ThisSid} mn_${ThisJob}_mn_part1.sql USERLOG \
>> $LOG
Re: Unix Job to dump a query result to a flat file [message #185670 is a reply to message #185664] Thu, 03 August 2006 00:48 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Add a "SPOOL xxx.dat" and "SPOOL OFF" to your SQL script.
Previous Topic: Craete Mainframe GDG with RECL = 1460 thru UNIX
Next Topic: Important memory parameters used by oralce 10G and peoplesoft on AIX 595 box
Goto Forum:
  


Current Time: Thu Apr 18 22:58:12 CDT 2024