Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to show actual payment vs projected payment

Status
Not open for further replies.

Tokolosche

Technical User
Apr 2, 2003
8
AU
Hello,

I have a database where it records a customers information of a set payment over a set number of weeks. E.g. Payment of $50 per week, over 52 weeks.

So I want the query to show what the total payments should be at week 20, and what the actual total payments are. E.g. At 20 weeks payments made should be $2,000, but if the customer has only paid $1,500, I could see the difference.

Any examples anyone could give me would be very appreciated!

Thanks
Drew
 
Hi Leslie,

Thanks for your response.

I am not sure what info you are after for the table structure? The data this is stored in is the same table as the customer information.

Field names:

DAP$ (currency) - this is the amount that the customer needs to pay per week.

DAPWeeks (number) - This is the number of weeks the customer needs to pay over

AmountPaid (currency) - This is a manually upadted field that reflects what the customer has actually paid at any given time.

I don't actually have any sample data as of yet as this is brand new. The example I gave above is indicative of what will be entered in though. If you need be to create some examples I can.
 
Is it just
Code:
Select DAP, DAPWeeks, AmountPaid
     , (DAP * DAPWeeks) As [Computed Total Payment]
     , (AmountPaid - (DAP * DAPWeeks)) As [Difference]

From ...
?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top