By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,313 Members | 1,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,313 IT Pros & Developers. It's quick & easy.

sqlplus exit statement prematurely terminates unix script

P: 3
echo ""
echo "Enter person ID:"
read person_id
sqlplus -silent '/nolog'<<end_sql1
connect useract/passwd
start $BANNER_LINKS/gurlsid.sql
cat person.lst >person_list
sqlplus -silent '/nolog'<<end_sql2
connect useract/passwd
start $BANNER_LINKS/gurlsid.sql
cat person.lst >>person_list
sqlplus -silent '/nolog'<<end_sql2b
connect useract/passwd
spool person
set feedback off
column "Table Name" format a12
column "Column Name" format a30
column "Count" format 9999
column "Condition" format a32
select 'FOBTEXT' "Table Name",
'FOBTEXT_CODE' "Column Name",
count(fobtext_code) "Count",
from fobtext
where fobtext_code = '$person_id'
and fobtext_dtyp_seq_num = 73
having count(fobtext_code) > 0;
spool off
cat person.lst >>person_list
echo ""
echo "finish my program"

the last three statements did not execute at all. The last file(person.lst) has something, but it didn't append to person_list. Also the last two echo didn't display on the screen either. I think somehow when exiting from sqlplus, it just exited out of the script completely.

Can someone indicate why the last three statements of this script did not carry out?

Sep 27 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.