Obvious first question- what is the exact value of #arguments.listing_office_mls_id#?
When debugging something that I can't figure out from the query, I put the whole things within a CFOUTPUT so I can see exactly what's being sent to the DB. -----Original Message----- From: listmas...@houseoffusion.com [mailto:listmas...@houseoffusion.com] On Behalf Of Rick Faircloth Sent: Tuesday, March 05, 2013 8:48 AM To: cf-talk Subject: Anyone see anything wrong with the syntax of the query? <cfquery name = "qGetAllPropertiesAndOpenHouses" datasource="#arguments.real_estate_dsn#"> select substring_index(p.mls_number, '_', 1) as p.mls_number, p.street_number, p.street_name, p.city, p.state, oh.mls_number, oh.date, oh.start_time, oh.end_time, oh.host_name from properties p left join fortstewart.open_houses oh on substring_index(p.mls_number, '_', 1) = oh.mls_number where p.listing_office_mls_id = '#arguments.listing_office_mls_id#' order by p.street_name, p.street_number </cfquery> I keep getting a CF error stating I have a syntax error on this line: where p.listing_office_mls_id = '#arguments.listing_office_mls_id#' Anything? Thanks! Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354819 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm