"Merging" queries

noccy

Registered User.
Local time
Today, 20:48
Joined
Aug 19, 2003
Messages
67
merging multiple queries
Hello!

I have three queries with the same structure. They all have two culumns, named ID and Adress.

Can I merge theese three queries into one fourth query containing all records, and how?

noccy
 
Can you tell me how to post a totally new thread?

The only thing I seem to be able to find is "Post Reply"...Where do I go to post a brand new thread?
 
Well....Find the right forum and hit the new thread button....
 
Create a union query. Read in the Access online help about it. Basically, you go into your query design view, switch to SQL view (because the queries cannot be graphically represented) and then input some SQL like this:
Code:
SELECT * FROM table1 UNION (SELECT * FROM table2 UNION (SELECT * FROM table3));
Access will match up the columns easily if they all have the same number of columns in the same positions.

By default UNION queries exclude duplicates. If you want duplicates, use UNION ALL.
 
And how would the syntax be with 2 tables/queries?

And what about field names? What will they be?



...Well i found out =)

I got rid of the () and the field names solved by Select As

Thanks for your help on a Sunday =)

noccy
 
Last edited:

Users who are viewing this thread

Back
Top Bottom