spool - SQLPlus: SPOOLing vs writing to log -
i using shell script 'spool' query. here toy version:
#!/bin/sh sqlplus -s userid/pass@sid << eof set echo off set term off set trims on set pages 0 set feedback off set linesize 1000 set colsep "|" spool $2 select 'header1|header2|header3' dual union select column1||'|'|| column2||'|'|| column3 $1; spool off exit 0; eof
and submitting using
nohup sh sqlquery.sh intable outtable > log &
the query runs fine , formatted how like, rows returned query written both spool file , log... thought 'set echo off' take care of this, missing something.
any ideas?
sqlplus spool
No comments:
Post a Comment