Say I have a table with three fields:
PKID UserID PhoneNumber
There are three rows
Row1: 1 15 123 Row2: 1 15 456 Row3: 1 15 789
You can see that I have three separate phone numbers for userID 15. I want to display that in query results in one row: UserID, PhoneNumber1, PhoneNumber2, PhoneNumber3.
I have a much more complex query that gives me correct results in a cartesian product. I'm trying to eliminate the cartesian product.
Here are alternatives for single column csv as well as pivot to separate columns:
answered Nov 12, 2009 at 05:33 PM
answered Nov 13, 2009 at 03:52 AM