Every year I need to delete the balance forward for unit accouts after year-end is run. I can select the accounts using the following:
SELECT dbo.GL20000.OPENYEAR, dbo.GL20000.TRXDATE, dbo.GL20000.DEBITAMT, dbo.GL20000.CRDTAMNT, dbo.GL20000.SOURCDOC, dbo.GL20000.ACTINDX, dbo.GL20000.REFRENCE, dbo.GL00100.ACTNUMBR_2, dbo.GL00100.ACTDESCR, dbo.GL00100.ACTNUMBR_3, dbo.GL00100.ACTNUMBR_4
FROM dbo.GL00100 INNER JOIN dbo.GL20000 ON dbo.GL00100.ACTINDX = dbo.GL20000.ACTINDX
WHERE (dbo.GL00100.ACCTTYPE = '2') AND (dbo.GL20000.SOURCDOC = 'bbf')
What would my delete statement look like? Normally I use "Where ACTINDX in ('....and have all the unit account indexes here, but there are more and more each year.
SELECT dbo.GL20000.OPENYEAR, dbo.GL20000.TRXDATE, dbo.GL20000.DEBITAMT, dbo.GL20000.CRDTAMNT, dbo.GL20000.SOURCDOC, dbo.GL20000.ACTINDX, dbo.GL20000.REFRENCE, dbo.GL00100.ACTNUMBR_2, dbo.GL00100.ACTDESCR, dbo.GL00100.ACTNUMBR_3, dbo.GL00100.ACTNUMBR_4
FROM dbo.GL00100 INNER JOIN dbo.GL20000 ON dbo.GL00100.ACTINDX = dbo.GL20000.ACTINDX
WHERE (dbo.GL00100.ACCTTYPE = '2') AND (dbo.GL20000.SOURCDOC = 'bbf')
What would my delete statement look like? Normally I use "Where ACTINDX in ('....and have all the unit account indexes here, but there are more and more each year.