Avoiding spooling to empty files
Date: Fri, 30 Jan 2009 12:53:00 -0800 (PST)
I'm working with Oracle 10.2.0.4.0
I have an unix script that via command line executes a query
$ORACLE_HOME/bin/sqlplus -silent <<EOF
connect user/pass_at_databse set pagesize 0 set heading off set echo off set term off set feedback off set linesize 126 spool /tmp/file_to_send SELECT * FROM table;
EOF The issue is that if there is not data it generates a file with a control caracter (Don't know which one).
I want to know how to avoid file generation via SQLPLUS commands or at least don't send any invisible caracter to the file.
Thanks. Received on Fri Jan 30 2009 - 14:53:00 CST