Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Created on 18.07.2023 by MARTIN.COUFAL
- DECLARE
- -- Local variables here
- i INTEGER;
- CURSOR get_rec_ IS SELECT * FROM Depr_Proposal_History_TAB WHERE COMPANY = 'SCZ' AND
- BOOK_ID = 'DAN' AND YEAR = 0;
- attr_ VARCHAR(2000);
- info_ VARCHAR(2000);
- BEGIN
- IF NOT Database_SYS.Is_Db_Patch_Registered('FIXASS', 000069111.230726) THEN
- FOR oldrec_ IN get_rec_ LOOP
- IF oldrec_.YEAR = 0 THEN
- UPDATE depr_proposal_history_tab
- SET YEAR = 1
- WHERE company = oldrec_.company
- AND book_id = oldrec_.book_id
- AND object_id = oldrec_.object_id
- AND YEAR = oldrec_.YEAR
- AND period = oldrec_.period
- AND depreciation_until_date = oldrec_.depreciation_until_date;
- END IF;
- END LOOP;
- COMMIT;
- Database_SYS.Register_Db_Patch('FIXASS', 000069111.230726, 'Modify depr proposal history');
- END IF;
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement