I have a table which looks like the below:
CBRNO item FY1 Amount1 FY2 Amount2
CCC01 1 2012 100 2013 200
CCC01 2 2012 100 2013 100
AAA01 1 2012 100 2013 300
I want results like this:
That means I want the result of total amount of the request where meeting date falls under he curent fiscal year i.e for CCC01 the meetingdate is 2012 fiscalyear(before jube 30th 2012) so the FY1 amount is tottaled for all items and similarly the meetingdate for AAA01 is 2013 fiscal year do FY2 amount was considered.
I need to know how I can make up a sql query for this. I use sqlserver and use .Net,kindly help?