generating a flat file with chr(10)
Date: Mon, 22 Jun 2009 17:42:02 -0400
I need to create some data in a flat file ( read: plain vanilla ), with the value of each var on a seperate line. I would have thought the following would work, but it does not. It keeps giving me a blank line between DB rows.
set linesize 500
set pagesize 0
set heading off
set headsep off
set timing off
set verify off
set echo off
set feedback off
set serveroutput on size 500000
set termout on
set trimspool on
define newline = chr(10) -- <=== new line char
--define newline = "''"
select var1 || &newline || var2 || &newline || var3 from some_table
where trans_dt= '01-may-2008'
Here are three written rows;
they should look like this
The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you.
http://www.freelists.org/webpage/oracle-l Received on Mon Jun 22 2009 - 16:42:02 CDT