A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Join Type



 
 
Thread Tools Display Modes
  #1  
Old September 21st, 2006, 07:37 PM posted to microsoft.public.access.queries
Brad
external usenet poster
 
Posts: 943
Default 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  
Old September 21st, 2006, 07:43 PM posted to microsoft.public.access.queries
Klatuu
external usenet poster
 
Posts: 7,074
Default 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  
Old September 21st, 2006, 07:46 PM posted to microsoft.public.access.queries
Brad
external usenet poster
 
Posts: 943
Default 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  
Old September 21st, 2006, 08:01 PM posted to microsoft.public.access.queries
Klatuu
external usenet poster
 
Posts: 7,074
Default 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  
Old September 21st, 2006, 11:21 PM posted to microsoft.public.access.queries
Michel Walsh
external usenet poster
 
Posts: 2,404
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.