I have 5 records. What makes each record unique is the
charge_start_da te and the charge_end_date .
what i need to do is this:
rec1 csd is 04/01/03 and the ced is 03/31/05 charge_amt = 50,000
rec2 csd is 04/01/05 and the ced is 03/31/10 charge_amt = 60,000
rec3 csd is 04/01/10 and the ced is 03/31/15 charge_amt = 70,000
rec4 csd is 04/01/15 and the ced is 03/31/20 charge_amt = 80,000
rec5 csd is 04/01/20 and the ced is 03/31/25 charge_amt = 100,000
there is also a charge_amt associated with each record.
What I have to do is create calendar year charges ( jan - dec ).
2003 is 9/12 of 50,000
2004 is 3/12 of 50,000 and 9/12 of 60,000
2005 is 3/12 of 60,000 and 9/12 of 70,000
and so on.
The charge dates will vary throughout the year.
There is a tenant_id that I can group on, the 5 records above will be
grouped by a tenant_id.
So, I will have to create a new table with field headings of 2003
2004 2005 2006 2007 ......to 2025
Also, the number of years will vary, although I can look into the data
and get the end year. I am importing data into an access db.
any help is appreciated.
tia
stan
charge_start_da te and the charge_end_date .
what i need to do is this:
rec1 csd is 04/01/03 and the ced is 03/31/05 charge_amt = 50,000
rec2 csd is 04/01/05 and the ced is 03/31/10 charge_amt = 60,000
rec3 csd is 04/01/10 and the ced is 03/31/15 charge_amt = 70,000
rec4 csd is 04/01/15 and the ced is 03/31/20 charge_amt = 80,000
rec5 csd is 04/01/20 and the ced is 03/31/25 charge_amt = 100,000
there is also a charge_amt associated with each record.
What I have to do is create calendar year charges ( jan - dec ).
2003 is 9/12 of 50,000
2004 is 3/12 of 50,000 and 9/12 of 60,000
2005 is 3/12 of 60,000 and 9/12 of 70,000
and so on.
The charge dates will vary throughout the year.
There is a tenant_id that I can group on, the 5 records above will be
grouped by a tenant_id.
So, I will have to create a new table with field headings of 2003
2004 2005 2006 2007 ......to 2025
Also, the number of years will vary, although I can look into the data
and get the end year. I am importing data into an access db.
any help is appreciated.
tia
stan
Comment