SELECT sheet1.客户ID, sheet1.分管部门, [销售收入]/DCount("客户id","sheet1","客户id=" & [客户id]) AS 收入 INTO AAA
FROM sheet1
WHERE (((sheet1.客户ID) In (SELECT [客户ID] FROM sheet1 As Tmp GROUP BY ...
Henry D. Sy 发表于 2009-8-19 12:07
SELECT sheet1.客户ID, sheet1.分管部门, [销售收入]/DCount("客户id","sheet1","客户id='" & [客户id] &"'") AS 收入 INTO AAA
FROM sheet1
WHERE (((sheet1.客户ID) In (SELECT [客户ID] FROM sheet1 As Tmp GROUP BY [客户ID] HAVING Count(*)>1 )))
ORDER BY sheet1.客户ID