This will be the first procedure I have ever written but pretty much this is what I need to do:
Query against a date dimension table to return the current fiscal year
Then create 8 additional variables which will use the current fiscal year variable to determine the start and end dates of the current fiscal year as well as the three proceeding fiscal years
ie:
declare var1 as smalldatetime
set var1 = '2/1/' + @Cur_FY
set var1 = '1/31/' + (@Cur_FY+1)
set var1 = '2/1/' + (@Cur_FY+1)
set var1 = '1/31/' + (@Cur_FY+2)
etc...
This information will then be used to create a query which will look at proposals with projected and awarded data, the goal is to use it to project funding going forward... I have no problem writing that query, its just figuring out what I'm doing wrong while working with the date values.
Thanks in advance for any help!
Query against a date dimension table to return the current fiscal year
Then create 8 additional variables which will use the current fiscal year variable to determine the start and end dates of the current fiscal year as well as the three proceeding fiscal years
ie:
declare var1 as smalldatetime
set var1 = '2/1/' + @Cur_FY
set var1 = '1/31/' + (@Cur_FY+1)
set var1 = '2/1/' + (@Cur_FY+1)
set var1 = '1/31/' + (@Cur_FY+2)
etc...
This information will then be used to create a query which will look at proposals with projected and awarded data, the goal is to use it to project funding going forward... I have no problem writing that query, its just figuring out what I'm doing wrong while working with the date values.
Thanks in advance for any help!