上了sql 2005,要想问的太多,太多(1、复制代码到fxotable中,提示with附近有错误) Post By:2011/1/4 11:23:00 [只看该作者]
提示错误
此主题相关图片如下:bb.jpg
sql2005代码:
with cte as ( select a.出库单号, 客户, b.产品, 最后订购日期= 日期 ,订购数量=数量 from 出库 a , 出库明细 b where a.出库单号=b.出库单号 ) select * from cte t where not exists(select 1 from cte where 客户=t.客户 and 产品=t.产品 and 最后订购日期>t.最后订购日期)