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  

Relationship - Outer Join - Microsoft Access 2002



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2010, 08:11 AM posted to microsoft.public.access.queries
Vanessa Simmonds
external usenet poster
 
Posts: 23
Default Relationship - Outer Join - Microsoft Access 2002

Good Morning,

I have a queries which for the moment contains two tables (DUIT and NPI) and
one outer join (all Values on DUIT and one value from NPI).

I now want to included a third table (actions) and create another outer join
(all values on DUIT and one value from NPI).

However Access is telling me that "Only two tables are allowed with an outer
join".

How can i make this work?

Best Regards,

Vanessa Simmonds
  #2  
Old February 18th, 2010, 01:20 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Relationship - Outer Join - Microsoft Access 2002

You should be able to have multiple outer joins in a query. BUT in some cases
the differing outer joins cannot be resolved. In that case you might need to
use nested queries.

Query one would be your current query. Create a new query and add query one
and the additional table to the new query and set up your join based on this.

If you can post the SQL of the query that will not work perhaps someone can
help you rewrite it.

This should work
SELECT *
FROM (DUIT LEFT JOIN NPI
ON DUIT.xxx = NPI.yyy)
LEFT JOIN Actions
ON DUIT.aaa = Actions.bbb

This **might** fail (note the direction of the outer joins has changed)
SELECT *
FROM (NPI RIGHT JOIN DUIT
ON DUIT.xxx = NPI.yyy)
LEFT JOIN Actions
ON DUIT.aaa = Actions.bbb


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Vanessa Simmonds wrote:
Good Morning,

I have a queries which for the moment contains two tables (DUIT and NPI) and
one outer join (all Values on DUIT and one value from NPI).

I now want to included a third table (actions) and create another outer join
(all values on DUIT and one value from NPI).

However Access is telling me that "Only two tables are allowed with an outer
join".

How can i make this work?

Best Regards,

Vanessa Simmonds

 




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 05:31 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.