I have written a shell script to login to sqlplus, run sql and spool into a text file.
Here is a part of the script:
sqlplus $login < set feed off;
set verify off;
set head off;
set echo off;
set termout off;
#set page 0;
spool $pth/GLACCT.D$dt;
select rownum||'|'||acct||'|'||acct_desc||'|'||entity||'|'||org_cd||'|'||prod_cd||'|'||state||'|'||invest_y ear||'|'||
amt_class||'|'||curr_cd||'|'||amt from bar_stg_ss_acct_balance
where aud_hdr_id in (select aud_hdr_id from bar_aud_hdr where to_char(load_dt,'mm/dd/yyyy')=to_char(sysdate,'mm/dd/yyyy'))
/
spool off;
Now the problem is the text file also contains the sql and the command spool off besides the data . How do I eliminate that from getting spooled??
hanx
Kavita