Ana
2008-01-23 09:05:15 UTC
Hello all,
I'm stumble on a project so I would appreciate someone's help.
I've a company which sells several service contracts everyday with duration
from one to 36 months. The tbl parameters are as follows:
ID, cost, activation_date, start_date, end_date .. among many other fields.
The idea is to create a query/report outputting daily and monthly cost
information considering the leap year.
Example, today's daily report if starting today: sum(cost) / contract
period in days where start_date = getdate()
Example, tomorrows' daily report if starting today: (today's results -1) +
(sum(cost) / contract period in days where start_date = getdate())
Hope I've being clear. TIA
Ana
I'm stumble on a project so I would appreciate someone's help.
I've a company which sells several service contracts everyday with duration
from one to 36 months. The tbl parameters are as follows:
ID, cost, activation_date, start_date, end_date .. among many other fields.
The idea is to create a query/report outputting daily and monthly cost
information considering the leap year.
Example, today's daily report if starting today: sum(cost) / contract
period in days where start_date = getdate()
Example, tomorrows' daily report if starting today: (today's results -1) +
(sum(cost) / contract period in days where start_date = getdate())
Hope I've being clear. TIA
Ana