By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,400 Members | 953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,400 IT Pros & Developers. It's quick & easy.

full outer join on two tables

P: n/a
i have two tables, Event1 and Event2.
They both have fields called contactID and eventID in them.
Some of the contactID's between the tables are equal and some are not.
I want to do a full outer join on contactID so i can get all the
contactID's in the query.

i know access doesn't support full outer joins so there must be a way to
do it without using one.

how do you do it in access 2000?

thanks in advance,

Cory
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cory,
Create a union of a left and a right join, so:
SELECT ACTIVE_EVENT.CONTACTID, ACTIVE_EVENT.EVENTID
FROM EVENT1 AS ACTIVE_EVENT
LEFT JOIN EVENT2 AS CLOSED_EVENT
ON ACTIVE_EVENT.CONTACTD = CLOSED_EVENT.CONTACTID
AND ACTIVE_EVENT.EVENTID = CLOSED_EVENT.EVENTID
UNION
SELECT CLOSED_EVENT.CONTACTID, CLOSED_EVENT.EVENTID
FROM EVENT1 AS ACTIVE_EVENT
RIGHT JOIN EVENT2 AS CLOSED_EVENT
ON ACTIVE_EVENT.CONTACTD = CLOSED_EVENT.CONTACTID
AND ACTIVE_EVENT.EVENTID = CLOSED_EVENT.EVENTID

"Cory" <no@no.com> wrote in message
news:1W******************@news02.tsnz.net...
i have two tables, Event1 and Event2.
They both have fields called contactID and eventID in them.
Some of the contactID's between the tables are equal and some are not.
I want to do a full outer join on contactID so i can get all the
contactID's in the query.

i know access doesn't support full outer joins so there must be a way to
do it without using one.

how do you do it in access 2000?

thanks in advance,

Cory

Nov 13 '05 #2

P: n/a
Cory <no@no.com> wrote in
news:1W******************@news02.tsnz.net:
i have two tables, Event1 and Event2.
They both have fields called contactID and eventID in them.
Some of the contactID's between the tables are equal and some
are not. I want to do a full outer join on contactID so i can
get all the contactID's in the query.

i know access doesn't support full outer joins so there must
be a way to do it without using one.

how do you do it in access 2000?

thanks in advance,

Cory


I create a union query for the desired field from each table, and
then left outer join that table back to each source.

Bob Quintal
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.