J
Jenay
Guest
Sorry... I don't have the syntax down for Access/SQL, can you help me?
I'm trying to build a query; I have a table that has:
Debit
Credit
CustName
TransDate
and I want to build a new query where I have
CustName
date30
where CustName is the same from the table
and where date30 is the sum of all the debit - credits for each CustName where TransDate is less then 30 days ago.
I think I want something like:
date30 = (sum(Debit) - sum(Credit)) where CustName = XXXX AND (TransDate - date(now)) <= 30
I am very new to queries and don't know much, can you help me?
Jenay
I'm trying to build a query; I have a table that has:
Debit
Credit
CustName
TransDate
and I want to build a new query where I have
CustName
date30
where CustName is the same from the table
and where date30 is the sum of all the debit - credits for each CustName where TransDate is less then 30 days ago.
I think I want something like:
date30 = (sum(Debit) - sum(Credit)) where CustName = XXXX AND (TransDate - date(now)) <= 30
I am very new to queries and don't know much, can you help me?
Jenay