declare
cursor c1 is select serialno, trcode, fyear, mdate from gl_transacb where serialno>=107 and trcode='JV' AND FYEAR=18 order by serialno desc;BEGIN
FOR CR IN C1 LOOP
UPDATE gl_transacb SET SERIALNO=SERIALNO+1 WHERE TRCODE=CR.TRCODE AND FYEAR=CR.FYEAR AND SERIALNO=CR.SERIALNO;
UPDATE gl_SLBATCH SET SERIALNO=SERIALNO+1 WHERE TRCODE=CR.TRCODE AND FYEAR=CR.FYEAR AND SERIALNO=CR.SERIALNO;
UPDATE gl_TRANS_MASTER SET SERIALNO=SERIALNO+1 WHERE TRCODE=CR.TRCODE AND FYEAR=CR.FYEAR AND SERIALNO=CR.SERIALNO;
UPDATE gl_TRANS_DETAIL SET SERIALNO=SERIALNO+1 WHERE TRCODE=CR.TRCODE AND FYEAR=CR.FYEAR AND SERIALNO=CR.SERIALNO;
UPDATE gl_TRANS_SL SET SERIALNO=SERIALNO+1 WHERE TRCODE=CR.TRCODE AND FYEAR=CR.FYEAR AND SERIALNO=CR.SERIALNO;
END LOOP;
END;
/
No comments:
Post a Comment