
SBarnes wrote:How can I using an SQL statement remove all allocations back to a given date this will be the transaction date for a debtor that is the parent account and include all the allocations on the children as well?
DECLARE @DebtorID CHAR(20) = '00000000080000000002'
DECLARE @DateLimit DATETIME = '2012-10-15'
DELETE
FROM DB_TransAlloc
WHERE (DebtorID = @DebtorID OR DebtorID IN (SELECT DebtorID FROM DB_Main WHERE ParentDebtorID = @DebtorID))
AND DateAlloc >= @DateLimit

SBarnes wrote:Won't this also mean the allocated amount in DB_Trans will also now be wrong or will recalc balances fix that?


SBarnes wrote:Are you aware of any issues with the screen?


Return to Technical and or Programming
Users browsing this forum: No registered users and 2 guests