シェルスクリプトから直接SQLコマンドを呼び出す際に問題があります。私のシェルスクリプトは、次のコマンドが含まれています。シェルスクリプトから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ループは、(文の後に挿入されたもの)を行うことがないように思われていません。問題が何であるか考えている人がいますか?あなたは、単一のSQL文を使ってループを書き換えることができ
事前のおかげでたくさんの お祈り申し上げます イェルク
fdテーブルにはいくつかの行が含まれていますか? –