Link to home
Start Free TrialLog in
Avatar of tmajor99
tmajor99

asked on

SQL Selection to list attributes horizontally as columns

I need a SQL Select that change the orientation of a table.  Currently, I have a table containing two columns for each product.  Each row represents a attribute value for the product.  I need to list all the attributes horizontally as column not vertically as rows.  

Before:
UPC           Attribute ID           Attribute Value

1234         Brand                     Pillow
1234         Sub-Brand             MyPillow
1234         Color                       White
1234         Fixture                    N/A
2188         Brand                     Kennmore
3221         Color                      Black

After: (this is the format I need this data in)
UPC        Brand        Sub-Brand    Color     Fixture  

1234        Pillow        MyPillow      White     N/A
2188        Kennmore
3221                                                 Black
ASKER CERTIFIED SOLUTION
Avatar of Jay Leslie
Jay Leslie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial