Try this:Select t1.Color, MAX(t2.Small) AS SMALL, MAX(t2.Medium) AS Medium, MAX(t2.Large) AS Large FROMTable1 t1 INNER JOIN (SELECT Color, CASE WHEN SomeSize='s' THEN Price END AS Small,CASE WHEN SomeSize='m' THEN Price END AS Medium,CASE WHEN SomeSize='l' THEN Price END AS LargeFROM Table1) t2 ON t2.Color=t1.Color GROUP BY t1.Color
Change the column names to fit your needs.
Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url]