以下是我编写的proc代码。我在从(A)到(B)标记的块中收到语法错误,即ORA06550
,说SQL命令没有正确结束。
如果我删除了行l.ban4_upd ='UPDATED'
,则不再有任何错误消息。
我不知道如何纠正它。希望得到你的帮助,并提前感谢
DECLARE
dummy_BAN4 VARCHAR2(30);
dummy_bank_acc_num VARCHAR2(20);
CURSOR c_customers is
SELECT BAN4,Bank_acc_num FROM Test_Table ;
BEGIN
OPEN c_customers;
LOOP
FETCH c_customers into dummy_BAN4 , dummy_bank_acc_num;
IF c_customers%notfound THEN
update Test_Table chs Set
chs.error_msg ='No such record found in DB '
where bank_acc_num =dummy_bank_acc_num;
END IF;
update Transact_ord2 l Set.........................(A)
l.ban4_upd ='UPDATED'
l.x_account_number =dummy_BAN4
where X_account_number =dummy_bank_acc_num; ..........(B)
答案 0 :(得分:0)
您在所设置的字段之间缺少,
:
update Transact_ord2
Set ban4_upd = 'UPDATED',
x_account_number = dummy_BAN4
where X_account_number = dummy_bank_acc_num;