i have small issues i have been trying to figure out in SQL. I have a table with Item Numbers, Attribute Names and Attribute values. Each Item Number might have same or differen
I have just done this for my own data and I found the following worked for me:
Change the following line :
PIVOT
(([ATTRIBUTE_VALUE])
FOR [ATTR_DISPLAY_NAME] IN ( Select* [ATTR_DISPLAY_NAME] FROM tbl_ICC))
To:
PIVOT
(max(attribute_values) FOR [ATTR_DISPLAY_NAME] IN ( Select* [ATTR_DISPLAY_NAME] FROM tbl_ICC))
Note I removed the Attribute_Value in the Pivot.
*note: you need to check your variable names to ensure what I have written is what you need.