Use cfqueryparam to rule out the value of the arguments variable causing syntax related issues.
When an error tells you the line number and it is in a query, it rarely is that actual line; it just knows it is in the query somewhere. On 3/5/13 11:47 AM, "Rick Faircloth" <r...@whitestonemedia.com> wrote: > ><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:354825 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm