SqlPlus and formatted output
From: <stemp1ar_at_my-deja.com>
Date: 2000/02/16
Message-ID: <88d42u$et1$1_at_nnrp1.deja.com>#1/1
FROM table
WHERE ind = 'Y'
AND acct_cd NOT LIKE 'Z0%'
GROUP BY acct_cd
ORDER BY acct_cd;
Date: 2000/02/16
Message-ID: <88d42u$et1$1_at_nnrp1.deja.com>#1/1
I would like to run a pl/sql or sqlplus script and create a file that must be formatted and fixed positioning...the script below is close but every 4 line has a blank line?
Is there an easier way considering that I must have constants in the select stmt?
PLEASE RESPOND TO: stemp1ar_at_yahoo.com
(example script)
set LINESIZE 80
set pagesize 0
set trimspool on
set feedback off
set termout off
set wordwrap on
set trim on
spool test.dat
SELECT 'A123456'||acct_cd||'
EDP ''
||SUBSTR(LPAD(to_char(SUM(prev_period_net_comm)),13, '0'),1,13)
||' '||
' EMBEDED TEXT 1234 12345OTHER '
||'A123456'||acct_cd||' EDP '
||SUBSTR(LPAD(COUNT(*),13, '0'),1,13)||' '||
' EMBEDED TEXT 4120 12345OTHER
FROM table
WHERE ind = 'Y'
AND acct_cd NOT LIKE 'Z0%'
GROUP BY acct_cd
ORDER BY acct_cd;
spool off;
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Feb 16 2000 - 00:00:00 CET