How to select records as columns in SQL
- by Leigh
Hi,
I have two tables: tblSizes and tblColors. tblColors has columns called ColorName, ColorPrice and SizeID. There is one size to multiple colors. I need to write a query to select the size and all the colors (as columns) for a that size with the price of each size in its respective column.
The colors must be returned as columns, for instance:
SizeID : Width : Height : Red : Green : Blue
1---------220-----220----£15----£20-----£29
Hope this makes sense
Thank you