|
受玉树临风启发,做了个三数组合查询,也是笨办法
SELECT Costmer.strName, Costmer.AMOUNT, Costmer_1.AMOUNT, Costmer_2.AMOUNT, [costmer].[amount]+[costmer_1].[amount]+[costmer_2].[amount] AS hj, Costmer.ID, Costmer.BILL, Costmer_1.ID, Costmer_1.BILL, Costmer_2.ID, Costmer_2.BILL
FROM (Costmer INNER JOIN Costmer AS Costmer_1 ON Costmer.strName = Costmer_1.strName) INNER JOIN Costmer AS Costmer_2 ON Costmer_1.strName = Costmer_2.strName
WHERE ((([costmer].[amount]+[costmer_1].[amount]+[costmer_2].[amount])=5000) AND ((Costmer_1.ID)>[costmer].[id]) AND ((Costmer_2.ID)>[costmer_1].[id]))
ORDER BY Costmer.strName, Costmer.ID;
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|