Jim Dudley
Registered User.
- Local time
- Today, 12:06
- Joined
- Feb 16, 2012
- Messages
- 81
Error:
The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first create a separate query that performs the join and then include that query in your SQL statement.
SQL Statement:
TRANSFORM Sum(tbl_Attendance.Credits) AS SumOfCredits
SELECT tbl_Attendance.SNum, tbl_Students.LName, tbl_Students.FName, tbl_Students.Campus, tbl_Students.Email, tbl_Students.FGen, tbl_CertificatesLog.Notes AS Expr1, tbl_CertificatesLog.Bronze, tbl_CertificatesLog.Silver, tbl_CertificatesLog.Gold, tbl_CertificatesLog.Platinum, Sum(tbl_Attendance.Credits) AS [Total Of Credits], Sum(tbl_WS_LearningOutcomes.LO1) AS SumOfLO1, Sum(tbl_WS_LearningOutcomes.LO2) AS SumOfLO2, Sum(tbl_WS_LearningOutcomes.LO3) AS SumOfLO3, Sum(tbl_WS_LearningOutcomes.LO4) AS SumOfLO4, Sum(tbl_WS_LearningOutcomes.LO5) AS SumOfLO5, Sum(tbl_WS_LearningOutcomes.LO6) AS SumOfLO6
FROM tbl_CertificatesLog LEFT JOIN (tbl_WS_LearningOutcomes INNER JOIN (tbl_WS INNER JOIN (tbl_Students INNER JOIN tbl_Attendance ON tbl_Students.SNUM = tbl_Attendance.SNUM) ON tbl_WS.Wcode = tbl_Attendance.WCode) ON tbl_WS_LearningOutcomes.Wcode = tbl_WS.Wcode) ON tbl_CertificatesLog.SNUM = tbl_Students.SNUM
GROUP BY tbl_Attendance.SNum, tbl_Students.LName, tbl_Students.FName, tbl_Students.Campus, tbl_Students.Email, tbl_Students.FGen, tbl_CertificatesLog.Notes, tbl_CertificatesLog.Bronze, tbl_CertificatesLog.Silver, tbl_CertificatesLog.Gold, tbl_CertificatesLog.Platinum
ORDER BY tbl_Attendance.SNum
PIVOT tbl_Attendance.Type;
System:
Access 2010, Windows 7
Issue:
I am relatively new to SQL and understand I need to create a query but what do I need to query and how do I include that query in the statement?
Any input will be greatly appreciated.
Thank you.
Jim
The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first create a separate query that performs the join and then include that query in your SQL statement.
SQL Statement:
TRANSFORM Sum(tbl_Attendance.Credits) AS SumOfCredits
SELECT tbl_Attendance.SNum, tbl_Students.LName, tbl_Students.FName, tbl_Students.Campus, tbl_Students.Email, tbl_Students.FGen, tbl_CertificatesLog.Notes AS Expr1, tbl_CertificatesLog.Bronze, tbl_CertificatesLog.Silver, tbl_CertificatesLog.Gold, tbl_CertificatesLog.Platinum, Sum(tbl_Attendance.Credits) AS [Total Of Credits], Sum(tbl_WS_LearningOutcomes.LO1) AS SumOfLO1, Sum(tbl_WS_LearningOutcomes.LO2) AS SumOfLO2, Sum(tbl_WS_LearningOutcomes.LO3) AS SumOfLO3, Sum(tbl_WS_LearningOutcomes.LO4) AS SumOfLO4, Sum(tbl_WS_LearningOutcomes.LO5) AS SumOfLO5, Sum(tbl_WS_LearningOutcomes.LO6) AS SumOfLO6
FROM tbl_CertificatesLog LEFT JOIN (tbl_WS_LearningOutcomes INNER JOIN (tbl_WS INNER JOIN (tbl_Students INNER JOIN tbl_Attendance ON tbl_Students.SNUM = tbl_Attendance.SNUM) ON tbl_WS.Wcode = tbl_Attendance.WCode) ON tbl_WS_LearningOutcomes.Wcode = tbl_WS.Wcode) ON tbl_CertificatesLog.SNUM = tbl_Students.SNUM
GROUP BY tbl_Attendance.SNum, tbl_Students.LName, tbl_Students.FName, tbl_Students.Campus, tbl_Students.Email, tbl_Students.FGen, tbl_CertificatesLog.Notes, tbl_CertificatesLog.Bronze, tbl_CertificatesLog.Silver, tbl_CertificatesLog.Gold, tbl_CertificatesLog.Platinum
ORDER BY tbl_Attendance.SNum
PIVOT tbl_Attendance.Type;
System:
Access 2010, Windows 7
Issue:
I am relatively new to SQL and understand I need to create a query but what do I need to query and how do I include that query in the statement?
Any input will be greatly appreciated.
Thank you.
Jim