![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
| Using PIVOT and UNPIVOT |
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi Deepak Thanks for the response.. Unfortunately I dont have any control over the box, and am bound to using SQL2000 and AS2000. Regards Des Norton |
#4
| |||
| |||
|
|
http://www.sqlteam.com/item.asp?ItemID=2955, |
|
You can still do Pivots in SQL 2k, it just involves a lot more code than the PIVOT command. One such example using dynamic SQL can be found here http://www.sqlteam.com/item.asp?ItemID=2955, in fact this code is more flexible than the PIVOT command as it will dynamically work out the columns, PIVOT in SQL2k5 requires a static list of values. I'm sure a search on google could turn up many more. I know there are methods using case statements which require a static column list, but do not use dynamic sql. -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <ObpATIz7FHA.2676 (AT) TK2MSFTNGP15 (DOT) phx.gbl>, desREMOVEnortonUPPERCASE (AT) gmail (DOT) com says... Hi Deepak Thanks for the response.. Unfortunately I dont have any control over the box, and am bound to using SQL2000 and AS2000. Regards Des Norton |
![]() |
| Thread Tools | |
| Display Modes | |
| |