daniel kessler wrote:
> Would another good way to do this be to group all the ANDs (assuming that 
> they have content to use in the query) together in parens and then have all 
> the ORs following?
> 
> 1=1 AND (UPPER(n.meeting_name) LIKE '%somevalue%' AND UPPER(n.type) LIKE  
> '%anothervalue%') OR UPPER(n.notes) LIKE '%thirdvalue%'  OR 
> UPPER(n.notes_type) LIKE '%fourthvalue%'
> 

Whatever way you do it, just make sure that the logic you present to the 
user on the front end matches the logic that you use in the query.  You 
probably need to go through a bunch of different scenarios where you put 
in different combinations of data, and see if the logic matches what 
your expectation is.  I still recommend just allowing the user to choose 
one AND or OR for all values, as anything else is getting into more 
complicated "query building" territory that will most likely be hard to 
build and confusing to the end user.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268005
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to