Join Type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Thanks for taking the time to read my question.

I have 2 sets of data. I would like to see all the records from both sets,
but line up the records that do match, and include the records from both sets
that do match, without seeing each record for each record.

Tbl1 Tbl2
ID-----------------ID
1 1
2 3
4 4

Would Result in

1
2
3
4
 
If you only want to see one occurance of each ID, DISTINCT may be enough. I
would have to experiment to be sure.
 
HI,


If you need the records (the other fields), you can try a full outer join,
with MS SQL Server, or the following, with Jet:


SELECT a.*, b.* FROM a LEFT JOIN b ON a.id=b.id

UNION ALL

SELECT a.*, b.* FROM a RIGHT JOIN b ON a.id=b.id WHERE a.id IS NULL




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top