In mssql there shouldn't be a difference in the records returns. I would double check that the input variable #law.paid# is the same in both of these scenarios and also that none of these queries are cached.
-----Original Message----- From: Les Mizzell [mailto:[email protected]] Sent: Monday, October 18, 2010 3:17 PM To: cf-talk Subject: What difference does the parenthesis make? What's the difference between 1. ------------------------------ SELECT nl_id FROM vw_newsletters WHERE (paID=<cfqueryparam value="#law.paid#" cfsqltype="cf_sql_integer" />) AND (nl_status = 'published' OR nl_status = 'archived') 2. ------------------------------ SELECT nl_id FROM vw_newsletters WHERE paID=<cfqueryparam value="#law.paid#" cfsqltype="cf_sql_integer" /> AND (nl_status = 'published' OR nl_status = 'archived') #1 returns the correct records #2 returns nothing Not sure what difference the first set of parenthesis makes in #1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:338290 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

