I've noticed that in many Sage 200 databases, looking at the sales side, there aren't enough allocations to make up the allocated value recorded for some rows in the table SLPostedCustomerTran. In other words, the following query returns a non-zero result for some databases:
SELECT count(*)
FROM SLPostedCustomerTran
INNER JOIN SLAllocationTran on SLPostedCustomerTran.SLPostedCustomerTranID = SLAllocationTran.SLPostedCustomerTranID
GROUP BY SLPostedCustomerTran.SLPostedCustomerTranID, SLPostedCustomerTran.AllocatedValue
HAVING sum(SLAllocationTran.AllocationValue) <> SLPostedCustomerTran.AllocatedValue
Is there another table I should be looking at, perhaps one containing purged data? If not, would it be a fair assumption that the database is corrupted? (These are databases belonging to certain companies and I don't know exactly how the data was entered.)