mpemberton
Programmer
Here's the setup:
Table 1: accounts
AccountID
name
etc...
Table 2: lineitems
AccountID
code
AmtDue
Table 3: payments
AccountID
PmtAmt
Note: Payments are made to account, not to line items.
My dilemma:
Find all accounts with a (sum of lineitems.AmtDue - sum of payments.PmtAmt) > 0
I've tried several ways, but cannot get it to work.
I'm using Access 2000, and would like it compatible with SQL 7 or SQL 2000.
Thank you very much for your help!
Mark Pemberton
mpemberton@iliant.com
Table 1: accounts
AccountID
name
etc...
Table 2: lineitems
AccountID
code
AmtDue
Table 3: payments
AccountID
PmtAmt
Note: Payments are made to account, not to line items.
My dilemma:
Find all accounts with a (sum of lineitems.AmtDue - sum of payments.PmtAmt) > 0
I've tried several ways, but cannot get it to work.
I'm using Access 2000, and would like it compatible with SQL 7 or SQL 2000.
Thank you very much for your help!
Mark Pemberton
mpemberton@iliant.com