a 4th unstated option is a "no-join" Cartesian result set: all possible
combinations
Given: one table with employees (100 records) and one table with DayOfWeek
(7 records)
- Add both tables to query. No join between tables
- Add Employee name, Day of week fields to query
- Run query
- result would be a listing of all employees for each day of week ( 700
records)

Signature
HTH,
George
> Hi there,
>
[quoted text clipped - 9 lines]
>
> Suzanne
Grd - 17 Apr 2008 03:37 GMT
Thanks George,
The cartesian doesn't work for what I want here but its a very interesting
technique.
Thanks. Dale 'full outer join' gives me the results I'm after.
> a 4th unstated option is a "no-join" Cartesian result set: all possible
> combinations
[quoted text clipped - 20 lines]
> >
> > Suzanne
Suzanne,
I think what you are referring to is a "Full Outer Join". Assuming that you
have two tables that are similar, but contain records that may or may not
correspond, and you want to creat a query that has all the records from A and
B. Unfortunately, Access does not have a simple way to accomplish this.
However, the approved workaround is not too difficult.
1. Generally, I start by creating the left join:
SELECT A.Field1, A.Field2, A.Field3, B.Field4
FROM tableA as A LEFT JOIN tableB as B
ON A.Field1 = B.Field1
This will give you all the records from A, and only those from B that match.
2. Then go to the SQL view and add the following:
UNION
SELECT B.Field1, B.Field2, B.Field3, B.Field4
FROM tableB as B LEFT JOIN tableA as A
ON B.Field1 = A.Field1
WHERE A.Field1 IS NULL
3. So the final query would look like
SELECT A.Field1, A.Field2, A.Field3, B.Field4
FROM tableA as A LEFT JOIN tableB as B
ON A.Field1 = B.Field1
UNION
SELECT B.Field1, B.Field2, B.Field3, B.Field4
FROM tableB as B LEFT JOIN tableA as A
ON B.Field1 = A.Field1
WHERE A.Field1 IS NULL
Keep in mind, that in a UNION query, you have to have the same number of
fields in each portion of the union, and the field types must correspond.
If this doesn't answer your need, post back with more info on the two tables
(fields) you want to include in the query, and we'll see what we can do.

Signature
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
> Hi there,
>
[quoted text clipped - 8 lines]
>
> Suzanne
Grd - 17 Apr 2008 03:36 GMT
Works
Thanks
dale
> Suzanne,
>
[quoted text clipped - 50 lines]
> >
> > Suzanne