J
Jeff Boeker
I have two queries I would like to combine into one query and I'm not
able to find the proper syntax (see below). Additionally I would like
to get the total number of records retrieved in each query and be able
to limit the results of the second query to a set number of records
(say 10). Anybody give me some pointers?
Another question is how efficient union queries with different files
are relative to doing the query on each database separately (assume
can just append each recordset with no sorting).
Thanks,
Jeff
__________
qryEvents:
Select *
From tblEventHistory In 'f:\Database\Events\Events_20040705.mdb'
UNION ALL Select *
From tblEventHistory In 'f:\Database\Events\Events_20040706.mdb'
ORDER BY 3;
qryAlarms:
SELECT qryEvents.Parameters, Count(*) AS EventCount
FROM qryEvents
WHERE (((qryEvents.SeverityTypeID)=8))
GROUP BY qryEvents.Parameters
ORDER BY 2 DESC , 1;
able to find the proper syntax (see below). Additionally I would like
to get the total number of records retrieved in each query and be able
to limit the results of the second query to a set number of records
(say 10). Anybody give me some pointers?
Another question is how efficient union queries with different files
are relative to doing the query on each database separately (assume
can just append each recordset with no sorting).
Thanks,
Jeff
__________
qryEvents:
Select *
From tblEventHistory In 'f:\Database\Events\Events_20040705.mdb'
UNION ALL Select *
From tblEventHistory In 'f:\Database\Events\Events_20040706.mdb'
ORDER BY 3;
qryAlarms:
SELECT qryEvents.Parameters, Count(*) AS EventCount
FROM qryEvents
WHERE (((qryEvents.SeverityTypeID)=8))
GROUP BY qryEvents.Parameters
ORDER BY 2 DESC , 1;