[AccessD] Select Count(*) from different tables

Stuart McLachlan stuart at lexacorp.com.pg
Sun Aug 28 17:02:01 CDT 2005


On 28 Aug 2005 at 8:37, Arthur Fuller wrote:

Not sure quite what you mean bye compair the count of "each pair of tables" 
since you also say "I want to compare about two dozen tables"

Is this what you are talking about?
 
SELECT  "AssessID_Notes" as QName,  Count(*) 
 FROM [AssessID_Notes_DS Without Matching AssessID_Notes],

UNION

SELECT "Bill_Time_Machine",  Count(*) 
 FROM [Bill_Time_Machine_DS Without Matching Bill_Time_Machine])

UNION

SELECT "Description","Count(*)
FROM [qryMyNextQuery]


> I have two MDBs identical in structure (or nearly so) and I want to
> compare the counts of each pair of tables and put the results all in a
> single query. I know that I have done this before, but I can't quite
> remember the syntax I used. It is something along the lines of: 
> 

> But the above returns only one column, not two as I would expect. Since
> I want to compare about two dozen tables (queries, actually), I stopped
> at two until I could get it right. Removing the parentheses from the
> second "column" results in an error. 

> Can anyone suggest the correct syntax for this type of query? (This case
> is Access MDB not ADP, but it might be useful to have both answers
> handy.) 

-- 
Stuart





More information about the AccessD mailing list