Hi Guys, I am on a tight deadline and would really appreciate if you guys can provide some input. I am using SQL Server 2005.
I have following table:
Year Dept Month Tkt_Cnt
2008 R&D 02 2
2008 R&D 03 5
2008 R&D 01 6
2007 R&D 06 3
2007 HR 05 8
2007 HR 06 10
The result should look like:
Year Dept 01 02 03 04 05 06 07 08 09 10 11 12
2008 R&D 6 0 5 0 0 0 0 0 0 0 0 0
2007 R&D 0 0 0 0 0 3 0 0 0 0 0 0
2007 HR 0 0 0 0 8 1 0 0 0 0 0 0
I have following table:
Year Dept Month Tkt_Cnt
2008 R&D 02 2
2008 R&D 03 5
2008 R&D 01 6
2007 R&D 06 3
2007 HR 05 8
2007 HR 06 10
The result should look like:
Year Dept 01 02 03 04 05 06 07 08 09 10 11 12
2008 R&D 6 0 5 0 0 0 0 0 0 0 0 0
2007 R&D 0 0 0 0 0 3 0 0 0 0 0 0
2007 HR 0 0 0 0 8 1 0 0 0 0 0 0