SQL INNER JOIN Error 3061 Too Few Para. Expected 1
Posted on 2011-11-01
Have an SQL statement that is erroring:
SELECT MemberAssignments.StartDate, MemberAssignments.EndDate, MemberAssignments.AssignmentName FROM MemberAssignments INNER JOIN AssignmentTypeDefinitions ON (MemberAssignments.AssignmentType = AssignmentTypeDefinitions.TADLeaveTypeID) WHERE (((MemberAssignments.MemberID) = 276) AND ((MemberAssignments.StartDate) <= #11/30/2011#) AND ((MemberAssignments.EndDate) >= #11/1/2011#) AND (((AssignmentTypeDefinitions.FullType) = 'TAD INTERNAL') OR ((AssignmentTypeDefinitions.FullType) = 'TAD DISTANT') OR ((AssignmentTypeDefinitions.FullType) = 'TAD NEAR')))
I've tried it with and without parenthesis (excepting the OR section which needs it I think.
It's the OR ('TAD INTERNAL' OR 'TAD NEAR' OR 'TAD DISTANT') section that is causing the error, as the statement will run without it. Unfortunately, I need it :P
Working in an excel 2003 VBa envirnment, referencing a .mdb database using DAO.