Querying 2 Querys

M

Mike Fellows

i ahve 2 querys (both identical but from different databases - one from the
access DB and one from linked tables using SQL Server)

both querys contain the same fields

Query1:
ID
Surname1
Postcode
Town
SalesAppointment
SalesManager

Query2:

ID
Surname1
Postcode1
Town1
SalesAppointment
SalesManager


i need to make a query that puts the above 2 querys into 1 query but i have
no idea where to start to do this

I have created a Query3 and included the above 2 querys in it. i need it
sorting by postcode from both querys

Help

Thanks

Mike
 
G

Gerald Stanley

Try using a Union query e.g.
{Query 1 SQL}
UNION
{Query 2 SQL}
ORDER BY PostCode

If you put in the entire SQL in place of {Query 1 SQL} and
{Query 2 SQL}, you should get the answers you want.

Hope This Helps
Gerald Stanley MCSD
 

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