Ambigous outer joins??????

trackmedic

Registered User.
Local time
Today, 00:03
Joined
Aug 20, 2001
Messages
115
I have made a database and have made a query that takes the info from the tables and creates a report. I have a subtable in the form and have added another sub table. When I try to add the new subtable info into the query for the report, I get "ambigous outer joins"??? What the heck is that?????
 
Ambiguous outer joins means you have two tables with the same field names but you aren't explicitly telling Access which table you are referring to. For example, you have TableA with fields FName and LName. You then have TableB with LName and Age. The field LName is in both tables, which is fine. However, when referring to the field, you have to be explicit because of that. This will work:

SELECT TableB.LName

This is ambiguous:

SELECT LName

It doesn't know which table to pull LName from.
 
Here Is The Sql

SELECT jsamain.ID, jsamain.company, jsamain.vesselname, jsamain.workactivity, jsamain.worklocation, jsamain.datetime, jsamain.comments, [main body].[Identify Work Activities], [main body].[Identify Potential Hazards], [main body].[Precautions to Reduce Hazards], jsamain.employee1, jsamain.employee2, jsamain.employee3, jsamain.employee4, jsamain.employee5, jsamain.employee6, jsamain.employee7, jsamain.employee8, jsamain.employee9, [required ppe sub].safetyequipneeded
FROM (jsamain RIGHT JOIN [main body] ON jsamain.ID = [main body].number) INNER JOIN [required ppe sub] ON jsamain.ID = [required ppe sub].number
WHERE (((jsamain.ID)=[Please enter the current JSA number]));
 
You have an inner join after an outer join.
Move your inner join before your right join or change it to an outer join also
 

Users who are viewing this thread

Back
Top Bottom