I’m using SQL server 2008
I have the following SQL getting all dates between today and December 31st 2012. What I now what to do is start with a value of 10000 and increment this value equally so on December 31st I have a value of 150000.
Declare @projection table(d datetime, t decimal)
Declare @d datetime
Declare @t decimal(18, 2)
set @d='20110527'
set @t=100000
While @d<='20121231'
Begin
Insert into @projection values (@d, @t)
set @d=@d+1
End
Select d as DateCol, t as TotalRevenue from @projection
Any help greatly appreciated
This linearly interpolates
tfrom 10000 to 150000.Note that I cranked up the decimal precision to 4 to make rounding errors insignificant.