473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

full outer join on two tables

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
2 7441
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave | last post by:
Hi I have the following 4 tables and I need to do a fully outerjoin on them. create table A (a number, b number, c char(10), primary key (a,b)) create table B (a number, b number, c ...
7
by: alexcn | last post by:
I have the following query: SELECT dbo.tSymExch.exCode, dbo.tSymGrp.sgCode, dbo.tSymMain.smCode FROM dbo.tSymExch FULL OUTER JOIN dbo.tSymGrp ON dbo.tSymExch.exID =...
4
by: thilbert | last post by:
All, I have a perplexing problem that I hope someone can help me with. I have the following table struct: Permission ----------------- PermissionId Permission
3
by: Dam | last post by:
Using SqlServer : Query 1 : SELECT def.lID as IdDefinition, TDC_AUneValeur.VALEURDERETOUR as ValeurDeRetour FROM serveur.Data_tblDEFINITIONTABLEDECODES def,...
3
by: Martin | last post by:
Hello everybody, I have the following question. As a join clause on Oracle we use " table1.field1 = table2.field1 (+) " On SQL Server we use " table1.field1 *= table2.field1 " Does DB2...
4
by: Anthony Robinson | last post by:
I was actually just wondering if someone could possibly take a look and tell me what I may be doing wrong in this query? I keep getting ambiguous column errors and have no idea why...? Thanks in...
2
by: Lee | last post by:
I have two identical schema tables (one in a production library and another in a development library) and I need to be able to easily compare the data in them for errors and omissions. With...
2
by: dskillingstad | last post by:
I would really appreciate someone's help on this, or at least point me in the right direction.... I'm working on a permit database that contains 12 tables, and rather than list all of the...
20
by: FloggingDolphin | last post by:
Hi there, I'm kinda new to this so I hope I've explained it properly. Please ask if you need any additional info. Here is a simplified version of the issue I'm experiencing: I have two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.