the post of ranj@chn points in a good direction. perhaps it will be useful to look at the errormessages your fine working script produces. these are stored in the unix-variable cycle_id. you can add a
spool output.lst
at the beginning of your sqlplus-script and a
spool off
at the end. the file output.lst also contains this output
mfg guenter
1.....could you please try the upate statement using another sqlplus block,as as your existing block is not returning anything......
since you have used cycle_id=`sqlplus -S $XXX_USER/$XXX_PW@$XXX_CONNECT << EOF
i think thru the max value getting out from select stmt is not populating for update one.
2.......you can combine the update with the select one as follows,
UPDATE CTL_INTERFACE
set CYCLE_ID=(SELECT MAX(cycle_id) FROM ctl_cycle
WHERE interface_id='$INTRFC_ID')
where interface_id='$INTRFC_ID';
but without any cycle_id=`sqlplus -S $XXX_USER/$XXX_PW@$XXX_CONNECT << EOF
just simple use :`sqlplus -S $XXX_USER/$XXX_PW@$XXX_CONNECT << EOF