Skip to Content
Jan 28, 2010 at 12:25 PM

pricelist column in one query



please, how can I add into a query bellow asked pricelists to see them in columns not in rows?

SELECT T0.[ItemCode], T0.[ItemName], T0.[CardCode], T0.[SuppCatNum], T1.[Price], T1.[Currency], T0.[AvgPrice], T1.[PriceList], T4.[ListName], T2.[ItmsGrpNam], T0.[UpdateDate], T3.[CardName] FROM OITM T0 INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITB T2 ON T0.ItmsGrpCod = T2.ItmsGrpCod INNER JOIN OCRD T3 ON T0.CardCode = T3.CardCode INNER JOIN OPLN T4 ON T1.PriceList = T4.ListNum WHERE T4.[ListName]='[%0]' OR T4.[ListName]='[%1]' AND T1.[Price] > 0

Thank you in advance for your help,

rgds jonmar7