On 6/1/07, Will Tomlinson <[EMAIL PROTECTED]> wrote: > Need help figuring out why Access throws up on this query. I don't see > anything wrong with it. > > select a.id, a.title, a.body, a.projectidfk, a.useridfk, a.posted, > p.name as project, u.name as author > from lh_announcements a > left join lh_projects p on a.projectidfk = p.id > left join lh_users u on a.useridfk = u.id > where 1=1 > <cfif structKeyExists(arguments, "projectidfk") and > len(arguments.projectidfk)> > and (a.projectidfk in (<cfqueryparam cfsqltype="cf_sql_varchar" > value="#arguments.projectidfk#" list="true">) > or > a.projectidfk = '' > ) > </cfif> > order by a.posted desc > > [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft > Access Driver] Syntax error (missing operator) in query expression > 'a.projectidfk = p.id left join lh_users u on a.useridfk = u.id'. >
Will, Try putting your joins in parens... (lh_announcements a left join lh_projects p on a.projectidfk = p.id) left join lh_users u on a.useridfk = u.id it seems like I've had an issue with that in Access before. -jim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279886 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4