要一张物料信息表,显示的列有:物料号,物料名,价格清单01,价格清单02.
解决办法:运用表的连接关系,写SQL语句如下:
解决办法:运用表的连接关系,写SQL语句如下:
SELECT TOP 100 PERCENT T0.ItemCode, T0.ItemName, T1.Price AS price1,T2.Price AS price2
FROM dbo.OITM T0 INNER JOIN
dbo.ITM1 T1 ON T0.ItemCode = T1.ItemCode INNER JOIN
dbo.ITM1 T2 ON T0.ItemCode = T2.ItemCode
WHERE (T1.PriceList = '1') AND (T2.PriceList = '2')
ORDER BY T0.ItemCode
专注于企业信息化,最近对股票数据分析较为感兴趣,可免费分享股票个股主力资金实时变化趋势分析工具,股票交流QQ群:457394862
分类: SAP Business One
本文转自沧海-重庆博客园博客,原文链接:http://www.cnblogs.com/omygod/archive/2007/12/02/979817.html,如需转载请自行联系原作者