SQL*Plus results without additional information
Date: Thu, 09 Sep 2004 09:46:12 +0200
[Quoted] I'm trying to spool a select result into a file on unix. To do that, I have a shell script with the following line:
sqlplus scott/tiger_at_database < create.sql > /dev/null
and an additional file "create.sql" with the following commands:
set pagesize 0
set linesize 200
set serveroutput off
set heading off
SELECT Data FROM OutputTable;
This works, but my "MyResults"-File does not only contain the selected
rows. First line of output is "SQL> " followed by the select
And the file ends with a blank line, a line saying "87 rows selected", another blank line and a line containing "SQL> spool off".
Is it possible to avoid the additional four lines at the end of my result and the first line with the sql command? Of course I could do some "grep -v" in my shell script after the MyResults is created, but I think there must be a better way, to avoid the "garbage lines" when doing the select.
Ralf Received on Thu Sep 09 2004 - 09:46:12 CEST