I have created 2 Union Queries to provide a Freq Array Table. This was successeful. The Query was based on a table
I created a 3rd Union Query but this time based on a QUERY, I am getting a Syntax error in query expression Count(20_XYZ.QOHV), where 20_XYZ is the query name and QOHV is the calculated field in the query
Any ideas why the error?. The SQL is given below
Rgds & thanks once again
Dave
SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "0" AS rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)="0"));
UNION SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "0 to 100" AS Rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)>0.01 And (20_XYZ.QOHV)<100));
UNION SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "100 to 1000" AS Rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)>100.01 And (20_XYZ.QOHV)<1000));
UNION SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "1000 to 5000" AS Rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)>1000.01 And (20_XYZ.QOHV)<5000));
UNION SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "5000 to 25000" AS Rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)>5000.01 And (20_XYZ.QOHV)<25000));
UNION SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "25000 to 50000" AS Rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)>25000.01 And (20_XYZ.QOHV)<50000));
UNION SELECT Count(20_XYZ.QOHV) AS CountOfQOHV, "50000 to 160000" AS Rng
FROM 20_XYZ
WHERE (((20_XYZ.QOHV)>50000.01 And (20_XYZ.QOHV)<160000));