-2
我想要在Oracle SQL此過程:我想使這個過程在Oracle SQL
CREATE OR REPLACE PROCEDURE STS_OWNER.PRC_CAMBIO_LDC1 IS
CURSOR LDC1 IS
select CASE_NO
from ldc_cases
where case_no in (select barcode
from sts_tracking
where ldc='0'
and duplicated='0');
FOR UPDATE BARCODE;
BARCODE VARCHAR2(50);
BEGIN
OPEN LDC1;
FETCH LDC1 INTO BARCODE;
WHILE LDC1%FOUND LOOP
update sts_tracking
set ldc= 1
WHERE CURRENT LDC1;
FETCH LDC1 INTO BARCODE;
END LOOP;
CLOSE LDC1;
COMMIT;
END;
而你的問題是? –
這是正確的嗎? –
那麼,當你試圖創建它,你有錯誤嗎? –