outer joint query

I

inungh

I am looking an outer joint query like following. I just wonder does
MS Access support following query.


Table1
ID
1
2
3

Table2
ID
2
5
6

Can I have an outer joint query to get all records like?

Query Result
1
2
3
5
6

MS Access has Left Outer and Right Outer joint. Does it support Left
and Right Outer Joint together?
If yes, can you show me how to get the query?

Your help is great appreciated,
 
J

John W. Vinson

MS Access has Left Outer and Right Outer joint. Does it support Left
and Right Outer Joint together?
If yes, can you show me how to get the query?

Not directly, but you can construct one using a UNION:

SELECT TableA.ID LEFT JOIN TableB.ID
ON TableA.ID = TableB.ID
UNION
SELECT TableA.ID RIGHT JOIN TableB.ID
ON TableA.ID = TableB.ID

--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

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