If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Join Type
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 |
#2
|
|||
|
|||
Join Type
You need a UNION query
"Brad" wrote: 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 |
#3
|
|||
|
|||
Join Type
With DISTINCTROW?
"Klatuu" wrote: You need a UNION query "Brad" wrote: 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 |
#4
|
|||
|
|||
Join Type
If you only want to see one occurance of each ID, DISTINCT may be enough. I
would have to experiment to be sure. "Brad" wrote: With DISTINCTROW? "Klatuu" wrote: You need a UNION query "Brad" wrote: 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 |
#5
|
|||
|
|||
Join Type
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 "Brad" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|