I have MS Access database file with following tables
Table In
Id | Quantity
------------------------
1 | 8
Table Out
Id | Parent | Quantity
-------------------------
1 | 1 | 2
2 | 1 | 5
Table In
is a parent table and Table Out
is related table.
I need following constraint to be enforced (pseudo formula):
In.Quantity >= Sum(Out.Quantity)
That is: Sum of outgoing quantities cannot be greater than incoming quantity
I am developing a Winforms application. The user will make changes (Insert, Update and delete) to both In
and Out