September 23, 2009 at 5:34 am
I have a table below
Project # Color
Project A Red
Project A Blue
Project A Green
Project B Red
Project B Blue
Project B Green
and I need to pivot it to look like:
Project Color1 Color2 Color3
Project A Red Blue Green
Project B Red Blue Green
Anyone have any ideas?
Thanks!
Michael
September 23, 2009 at 7:35 am
From your sample data, it looks like you have two issues. The first is how to identify which is the first, second or third color. Not sure if that is an actual issue or if your sample data just leaves that out.
The second is your primary question, involving pivots. Please see the link in my signature for a full explanation of how to do this in SQL 2000. The syntax is easier than pivot too, in my opinion.
Let us know if you have any questions about how to make it work.
September 23, 2009 at 8:03 am
Awesome demonstration... I was almost ready write out the case statements for this?
Regards - Brad
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply