-
Combining rows from Query output
I've writen a query which gives following output:
2412 Person A Product 2
2412 Person A Product 17
2413 Person B Product 5
2413 Person B Product 4
2413 Person B Product 9
2416 Person C Product 15
2417 Percon C Product 2
2417 Person C Product 13
I want this to become
2412 Person A Product 17 Product 2
2413 Person B Product 9 Product 4 Product 5
2416 Person C Product 15 Product 2 Product 13
How to do this??? Please help (I'm a newby at queries!)
-
There's pivot operator in sql2k8.
-
Have a look at this: http://msdn.microsoft.com/en-us/library/ms177410.aspx
The syntax is a bit messy in my opinion, but you should ba able to do waht you want to with this
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|