Hi all,
Long story short - can one of you smart folks provide me the sql code to close a held controlled batch in our TEST environment? We have a live to test copy that is failing, apparently because of this open batch, and I can't find it to fix it.
Thanks,
Lesley
Try this.
DECLARE @Batch_no INT =
--insert batch number here
;
BEGIN TRANSACTION A
UPDATE T_BATCH
SET T_BATCH.status = 'C'
WHRER T_BATCH.batch_no = @Batch_no
/*
If OK, should only show 1 row effected
COMMIT TRANSACTION A;
If NOT ok,
ROLLBACK TRANSACTION A;
*/