Duplicate pivoted values using Pivot statement
-
Thursday, January 24, 2013 1:28 AM
Hi!
I already tried it my self but it's not working. Theoritically, it isn't possible either. I posted this just to give the benefit of the doubt.
Looking at the values presented below, is it possible to have a pivoted columns with duplicate name?
TIA!
All Replies
-
Thursday, January 24, 2013 5:24 AM
Hi,
step 1:add name in a column groups in matrix , add id field in below row.
Instead of name change ID in group on like below,
Mark this as answer if this post helps you.
- Edited by RamyaElango Thursday, January 24, 2013 5:24 AM
-
Thursday, January 24, 2013 6:30 AM
Hi,
I forgot to mention that this is about Sql statement Pivot tables and not SSRS.
-
Friday, January 25, 2013 8:22 AMModerator
Hi Jess,
In T-SQL, PIVOT operator rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output, and performs aggregations where they are required on any remaining column values that are wanted in the final output. So, the fourth record in the original table will be aggregated into the first column rather than a separate column in the output table.
Reference:
Using PIVOT and UNPIVOTRegards,
Mike Yin
TechNet Community Support- Marked As Answer by Jayvee Santiago Friday, January 25, 2013 9:15 AM


