I copied and pasted the entire contents into query analyzer but when I try to run this all I get is the following errors:
Server: Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'WITH'.
Server: Msg 170, Level 15, State 1, Line 10
Line 10: Incorrect syntax near ','.
Server: Msg 170, Level 15, State 1, Line 16
Line 16: Incorrect syntax near ','.
Server: Msg 170, Level 15, State 1, Line 42
Line 42: Incorrect syntax near 'PIVOT'.
what do I need to do to get it to run??