Tuesday, September 3, 2019

Dynamics GP - SQL Job to delete empty batches nightly

Run nightly when users are not using the system, and there is no risk of deleting a new batch someone is actively working on

------------------------------------------------------------------------------------------------------
--SELECT *

DELETE FROM SY00500

WHERE NUMOFTRX = 0 and SERIES = 3 and BCHSOURC = 'Sales Entry' and

bachnumb not in ( select bachnumb from SOP10100 )

No comments:

Post a Comment