January 25, 2011 at 12:04 pm
My query looks like this:
"SELECTSector, Region, [Technician #], [TOTAL MINS], [MONTH],[YEAR]
FROM Table 1"
I get a result set which contains total mins for each month dating back to Jan 2010.
I need to subtract the mins of JAN 2010 from JAN 2011 then divide by JAN 2010 mins in order to get a % change column.
How do I script this within the SELECT statement?
Please let me know if you need more info.
Thanks.
January 25, 2011 at 1:29 pm
This is a double post. Please reply to original post.
http://www.sqlservercentral.com/Forums/Topic1053496-149-1.aspx
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 25, 2011 at 7:56 pm
Mike01 (1/25/2011)
http://www.sqlservercentral.com/Forums/Topic1053496-149-1.aspx%5B/quote%5D
Hot link to other post: http://www.sqlservercentral.com/Forums/Topic1053496-149-1.aspx
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply