Hi,

I have a table, the data in which looks like

ID Amount Start Date End Date
85859 221952 2012-02-01 00:00:00 2013-01-31 00:00:00
60709 254256.99 2011-05-08 00:00:00 2014-05-07 00:00:00

I need to split the amount equally based on number of years(both date inclusive). the output should look like:

ID Amount Start Date End Date Year
85859 110976 2012-02-01 00:00:00 2013-01-31 00:00:00 2012
85859 110976 2012-02-01 00:00:00 2013-01-31 00:00:00 2013
60709 63564.2475 2011-05-08 00:00:00 2014-05-07 00:00:00 2011
60709 63564.2475 2011-05-08 00:00:00 2014-05-07 00:00:00 2012
60709 63564.2475 2011-05-08 00:00:00 2014-05-07 00:00:00 2013
60709 63564.2475 2011-05-08 00:00:00 2014-05-07 00:00:00 2014

Can someone help me to get this output using sql query?

Many thanks in Advance!!