G
Guest
My database is a sign inventory. One of the products we will give to the
client is a summary of all signs inventoried not including state owned signs.
Each location is unique and contains a sign (MUTCD) and a possible
supplemental sign (Supp_MUTCD) which have an Id. For example a Stop sign is
R1-1 which could have the supplemental sign R1-3 for "all way". The inventory
is one table.
I have tried the following Union query but I get a syntax error:
SELECT Signs.MUTCD,
Count (Signs.MUTCD) AS CountofMUTCD
FROM Signs
GROUP BY Signs.MUTCD,
WHERE Not (Signs.Ownership) = "State"
ORDER BY Signs.MUTCD
UNION ALL Signs.Supp_MUTCD,
Count (Signs.Supp_MUTCD) AS CountofMUTCD
FROM Signs
GROUP BY Signs.MUTCD,
WHERE Not(Signs.Ownership) = "State";
What I would like as a result is:
R1-1 100
R1-3 25
I3-1 120
etc.
Is this even possible to do or am I stuck giving two different reports while
manually adding up the signs? (UGH!)
client is a summary of all signs inventoried not including state owned signs.
Each location is unique and contains a sign (MUTCD) and a possible
supplemental sign (Supp_MUTCD) which have an Id. For example a Stop sign is
R1-1 which could have the supplemental sign R1-3 for "all way". The inventory
is one table.
I have tried the following Union query but I get a syntax error:
SELECT Signs.MUTCD,
Count (Signs.MUTCD) AS CountofMUTCD
FROM Signs
GROUP BY Signs.MUTCD,
WHERE Not (Signs.Ownership) = "State"
ORDER BY Signs.MUTCD
UNION ALL Signs.Supp_MUTCD,
Count (Signs.Supp_MUTCD) AS CountofMUTCD
FROM Signs
GROUP BY Signs.MUTCD,
WHERE Not(Signs.Ownership) = "State";
What I would like as a result is:
R1-1 100
R1-3 25
I3-1 120
etc.
Is this even possible to do or am I stuck giving two different reports while
manually adding up the signs? (UGH!)