Sunday, February 19, 2012

Database Question

If a client is going to pay you $100 a year for the next 5 years and I want to know, say in two years if they have made the payments that were due. How could I calculate this in a database? Would I need a payment schedule with dates that a payment was expected? And if yes how would I know if they made the due payments? I hope you can see what I need to know from this, but if not I will add more.

Thanks for any help.How about a table for payments, like so:


create table dbo.t_issue_saved_report_sql
(
PayID intnot null,
CustomerID int not null,
Amount varchar(255) not null,
DueDate datetime,
PaidDate datetime
)

So when your customer signs up, your program will populate the table with 5 entries, including the due dates for each year and the amount due. This is a simple representation, and I'm sure I'm missing something, but perhaps a start.

No comments:

Post a Comment