http://blog.niklasottosson.com/?p=761
http://stackoverflow.com/questions/6813210/oracle-sqlplus-saving-output-in-a-file-but-dont-show-on-screen
set Termout off
http://stackoverflow.com/questions/6813210/oracle-sqlplus-saving-output-in-a-file-but-dont-show-on-screen
SET echo off |
02 | SET feedback off |
03 | SET linesize 100 |
04 | SET pagesize 0 |
05 | SET sqlprompt '' |
06 | SET trimspool on |
07 | SPOOL filename.csv |
08 |
09 | SELECT field1 || ',' || field2 || ',' || field3 FROM tablename; |
10 |
11 | SPOOL off |
12 | exit |
IF bymistake you have run the query..
ReplyDeletesed -e 's/\ \ *$//' filename >filename.txt