Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
imrul
Starting Member
36 Posts |
Posted - 2008-07-29 : 07:12:15
|
| Hi,I have run the following query against Nortwind database to test the PIVOT query , but having problem with it. Can anyone help?Use NorthwindSelect Customerid,employeeidFrom (Select Customerid,employeeid from orders)OPIVOT(COUNT (employeeid) FOR Customerid IN ([4],[5])) AS pvt |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-07-29 : 08:38:43
|
Nortwind database ? Are you using SQL Server 2000 or 2005 ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-29 : 11:21:39
|
| Please note that PIVOT is only available on SQL 2005 onwards with compatibility level 90 and higher |
 |
|
|
|
|
|