Which Syntax to use for calculations of payment

Ravenray

Registered User.
Local time
Today, 17:50
Joined
Nov 21, 2003
Messages
32
I really hate being a n00bie at this and I must ask now that I so stuck. I know for any type of monthly payments, I will have to use a query to do this. But now i'm stuck on weather a datepart or datediff or maybe something outrageously different syntax to use to calculate this.

I have clients that have joined on different dates, and each pay a different amount of monthly dues. For example, John doe pays a monthly due of $20. He joined in October. Now I must run a query from October till present of each of those months. I know I will have to create a transaction table and deduct that from this query and I will get a current balance.

But the problem is just creating the query for the monthly dues. Any help will be appreciated, thanx.
 
Hi,

If i understand correctly all you need to do is:

SELECT *

FROM atable

WHERE joinDate < now()

That will give you every instance of data before the current date.
 
That's it! LOL! My head must of been in the wrong place when I was thinking this. Thank you very much.
 
Ok, I get this idea, but I don't think it will work properly. Cause, it does not show John doe monthly payment of $20 for October, November, December.
 
Hi,

Yeah he will have to use:

SELECT *

FROM atable

Group by MonthlyDue

Having joinDate < now()

That will goup all the different payments
 

Users who are viewing this thread

Back
Top Bottom