0
我想在Access 2003中創建一個查詢,該查詢結合了兩個查詢來查找結果之間的差異。查找Access 2003中兩個查詢的結果之間的差異
查詢1:[全部]
SELECT mars.Name, mars.Location, mars.Business_Unit
FROM mars
GROUP BY mars.Name, mars.Location, mars.Business_Unit;
返回
Name Location Business Unit
----- --------- -------------
John Sydney AU
Grace Brisbane AU
Lee Melbourne GU
問題2:[not_zero]
SELECT mars.Name, mars.Location, mars.Business_Unit
FROM mars
WHERE ((mars.orc)<>0)
GROUP BY mars.Name, mars.Location, mars.Business_Unit;
它返回:
Name Location Business Unit
----- -------- -------------
John Sydney AU
Grace Brisbane AU
我詢問,我想創建:
SELECT m.Name, m.Location, m.Business_Unit
FROM
all AS m
LEFT JOIN
Not_Zero AS o
ON (m.Name=o.Name)
AND (m.Location=o.Location)
AND (m.Business_Unit=o.Business_Unit)
GROUP BY m.Name, m.Location, m.Business_Unit;
我想我的查詢來實現:
Name Location Business Unit
---- --------- -------------
Lee Melbourne GU
而是我得到了相同的結果[全部]查詢:
Name Location Business Unit
----- --------- -------------
John Sydney AU
Grace Brisbane AU
Lee Melbourne GU
好了,所以這個[火星]表是這樣的:
Name Location Business Unit ORC
----- --------- ------------- ---
John Sydney AU 0
Grace Brisbane AU 5
John Sydney AU 10
Grace Brisbane AU 0
Lee Melbourne GU 0
Lee Paris EU 0
我想要做到的,是讓名字有獸人= 0一路即這就是爲什麼我想例如:
Name Location Business Unit ORC
---- --------- ------------- ---
Lee Melbourne GU 0
Lee Paris EU 0