multiple database

D

Dan

I have 2 access database, both with a table called Score (that has names and
grades as fields).
Can I query from a third access database to have the average of grades from
the 2 access database?
Many thanks
Dan
 
J

John Spencer

YES, you can.
\
\
\
\
Oh, you want a solution. Does the third database have links to the score
tables in the other 2 databases?

SELECT [Name], [Grade]
FROM TableScores1
UNION ALL
SELECT [Name], [Grade]
FROM TableScores2

SELECT [Name], Avg([Grade])
FROM SavedUnionQuery
GROUP BY [Name]

Now with that UNION query as the source you can build a totals query. If
the third database does not have links to Scores tables in the other
databases then you will need to build queries like

SELECT [Name], [Grade]
FROM Scores in 'C:\\Access Databases\ScoresDB.mdb'

And
SELECT [Name], [Grade]
FROM Scores in 'C:\\Access Databases\OtherScoresDB.mdb'

Then use those as the source for a UNION query and then build the totals
query

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top