SELECT /* non-pivoted column > , [ first pivoted column ] AS column name > , [ second pivoted column ] AS column name > , ... [ last pivoted column ] AS column name > */ ItemCode, ItemName, [1] AS Price1, [2] AS Price2, [3] AS Price3, [4] AS Price4, [5] AS Price5, [6] AS Price6, [7] AS Price7, [8] AS Price8, [9] AS Price9, [10] AS Price10 FROM -- this is the query that produces the data> (SELECT A.ItemCode, A.ItemName, B.PriceList, B.Price FROM OITM A INNER JOIN ITM1 B ON A.ItemCode=B.ItemCode WHERE A.ItemCode LIKE '11%') AS SourceTable PIVOT ( -- aggregation function> MAX(Price) FOR -- column that contains the values that will become column headers > PriceList IN -- ([first pivoted column], [second pivoted column],... [last pivoted column] ) ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10]) ) AS pvt ORDER BY ItemCode; here is the equivalent code for SQL SERVER 2000 SELECT A.ItemCode, A.ItemName, MAX(CASE B.Price...