Re: Using SQL output in shell scripts
From: billiauk <billiauk_at_yahoo.co.uk>
Date: 7 Jan 2002 05:27:50 -0800
Message-ID: <dee17a9f.0201070527.322ed687_at_posting.google.com>
Date: 7 Jan 2002 05:27:50 -0800
Message-ID: <dee17a9f.0201070527.322ed687_at_posting.google.com>
then in my SQL*Plus call, simply:-
COUNT=$(sqlplus -s orausername <<END
orapassword
SET PAGES 0 FEEDBACK OFF FLUSH OFF VERIFY OFF HEADING OFF ECHO OFF
WHENEVER SQLERROR EXIT 12
WHENEVER OSERROR EXIT 13
${SQL_STR}
EXIT;
END)
Hope this helps. BTW, this is Korn 92.
AB Received on Mon Jan 07 2002 - 14:27:50 CET