CURSOR C1 IS
SELECT *
FROM AP_SUPPLIER_SITES_ALL APSA
WHERE APSA.PAY_GROUP_LOOKUP_CODE = 'SUPPLIER';
VCOUNT NUMBER :=0;
BEGIN
FOR I IN C1 LOOP
UPDATE AP_SUPPLIER_SITES_ALL ASSA
SET ASSA.PAY_GROUP_LOOKUP_CODE = 'EMPLOYEE'
WHERE ASSA.VENDOR_ID = I.VENDOR_ID;
COMMIT;
VCOUNT := VCOUNT + 1;
END LOOP;
DBMS_OUTPUT.put_line('TOTAL RECORDS FOR EMPLOYEED = '||VCOUNT);
end;
No comments:
Post a Comment