我有一个直接从shell脚本调用SQL命令的问题。我的shell脚本包含以下命令:从shell脚本调用sqlplus
set x = `sqlplus -S $ISLK_ORACLE_UID` <<EOF
delete from rc where rcd_id = 1 ;
update rcd set standard = 'Test_DB7' where id = 1 ;
delete from rc where rcd_id = 2 ;
update rcd set standard = '700' where id = 2 ;
delete from rc where rcd_id = 5 ;
update rcd set standard = 'DB7' where id = 5 ;
delete from rc where rcd_id = 998 ;
update rcd set standard = '2001-2050' where id = 998 ;
delete from rc where rcd_id=3004 ;
begin
for fd_rec in (select * from fd)
loop
insert into rc values(1008, 1, fd_rec.id, '[email protected]') ;
end loop ;
end ;
commit;
EOF
单命令(删除,更新)没有任何问题的完成,但THW循环似乎并没有被执行(没有语句后插入)。有谁知道这个问题可能是什么?
感谢很多提前 最良好的祝愿 约尔格
fd表包含一些行吗? –