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  

Is there a join that does this?



 
 
Thread Tools Display Modes
  #1  
Old September 16th, 2008, 10:41 PM posted to microsoft.public.access.queries
0to60[_2_]
external usenet poster
 
Posts: 5
Default Is there a join that does this?

I need an INNER JOIN of TableA and TableB, and then I also want the rows of
TableA that DON'T have a match in TableB, and then vice versa. So basically
every row from both tables would be represented, and any rows that matched
up would be joined. Kinda like a LEFT JOIN plus a RIGHT JOIN.

Is there a way to get this?

  #2  
Old September 16th, 2008, 10:54 PM posted to microsoft.public.access.queries
Lord Kelvan
external usenet poster
 
Posts: 637
Default Is there a join that does this?

yeah use a union query

select tablea.*,tableb.*
from tablea left join tableb on tablea.id = tableb.id
union
select tablea.*,tableb.*
from tablea right join tableb on tablea.id = tableb.id

that query should and i say should cause it is untested preduce no
duplicates because it is union and not union all.

hope this helps

Regards
Kelvan
  #3  
Old September 17th, 2008, 04:36 AM posted to microsoft.public.access.queries
Lord Kelvan
external usenet poster
 
Posts: 637
Default Is there a join that does this?

i realised after making my above post that that is a technical
impossibility because it woudl state you have a many to many join with
no table inbetween can you tell me your table structure.

Regards
Kelvan
 




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 04:47 AM.


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