J
JustinP
I need to make a query for a report that includes a number of count and
count-like statements.
As an example (there are about 20 other statements like this example in
the query):
SELECT
Abs(Sum((IIf(MasterTable.SECTION_NAME="BCab",1,0)) And
(IIf(MasterTable.Private_Gov="PRIVATE",1,0)) And
(IIf(MasterTable.REDUNDANT=No,1,0)))) AS CountOfPrivOwn
FROM MasterTable;
but I also need to include this (and several like this with other
criteria):
SELECT Count(*) FROM
(SELECT DISTINCT Owner FROM Mastertable);
Is it possible to include both of these types of statements in the one
query? (I want this in one query for convience more than anything. Is
it possible to programmatically call data from another query in Access?
This may be an option.)
I am aware I could use a UNION in between them but as this would put
the second type of statement on another line could this data then be
automatically taken into the report?
Are there any other ways around this? Your suggestions are most welcome.
count-like statements.
As an example (there are about 20 other statements like this example in
the query):
SELECT
Abs(Sum((IIf(MasterTable.SECTION_NAME="BCab",1,0)) And
(IIf(MasterTable.Private_Gov="PRIVATE",1,0)) And
(IIf(MasterTable.REDUNDANT=No,1,0)))) AS CountOfPrivOwn
FROM MasterTable;
but I also need to include this (and several like this with other
criteria):
SELECT Count(*) FROM
(SELECT DISTINCT Owner FROM Mastertable);
Is it possible to include both of these types of statements in the one
query? (I want this in one query for convience more than anything. Is
it possible to programmatically call data from another query in Access?
This may be an option.)
I am aware I could use a UNION in between them but as this would put
the second type of statement on another line could this data then be
automatically taken into the report?
Are there any other ways around this? Your suggestions are most welcome.