I would recommend removing most of the OR clauses until you are getting correct results for that qry, then gradually adding them in again.
> -----Original Message----- > From: Rafael Bleiweiss [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 10 September 2003 2:41 p.m. > To: CF-Talk > Subject: RE: SQL syntax - Boolean OR > > oops... ok - the first time I tried I had LIKE instead of = > and when that didn't work I tried the = > > KeyWord is a variable (search form field) > > Now, however, when I switched back to the LIKE, I get back all 145 results > even when I search > for usinga a known instance that only has 3 records in it > > > > At 07:50 PM 9/9/03, you wrote: > >To state the obvious.... > > > >Is keyword a CF variable? Do you need to put ## around it? > > > >Also do these make sense? > > > >Alias = '%KeyWord%' > >OR Manufacturer = '%KeyWord%' > > > >Surely % is meaningless unless you use LIKE. > > > > > -----Original Message----- > > > From: Rafael Bleiweiss [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, 10 September 2003 1:41 p.m. > > > To: CF-Talk > > > Subject: SQL syntax - Boolean OR > > > > > > OK - I've scoured my manuals, previous emails and the web and can't > find > > > this though I know I've > > > seen it before... > > > > > > I've got a products table where in an advanced search I want to run a > > > query > > > on multiple fields and do the > > > OR thing on partial matches.... (whether I type a whole word or > partial > > > word) > > > > > > Here's the basic query I'm starting with to get it right and I don't > know > > > why but its bringing back > > > zero results - and I am going crazy - this "Should" bring back 145 > records > > > if I type in the letter a even > > > but I get NO records. > > > > > > any help please! > > > SELECT * from Products > > > WHERE Alias = '%KeyWord%' > > > OR Manufacturer = '%KeyWord%' > > > OR ProductName LIKE '%KeyWord%' > > > OR NAME LIKE '%KeyWord%' > > > OR Track01 LIKE '%KeyWord%' > > > OR Track02 LIKE '%KeyWord%' > > > OR Track03 LIKE '%KeyWord%' > > > OR Track04 LIKE '%KeyWord%' > > > OR Track05 LIKE '%KeyWord%' > > > OR Track06 LIKE '%KeyWord%' > > > OR Track07 LIKE '%KeyWord%' > > > OR Track08 LIKE '%KeyWord%' > > > OR Track09 LIKE '%KeyWord%' > > > OR Track10 LIKE '%KeyWord%' > > > OR Track11 LIKE '%KeyWord%' > > > OR Track12 LIKE '%KeyWord%' > > > OR Track13 LIKE '%KeyWord%' > > > OR Track14 LIKE '%KeyWord%' > > > OR Track15 LIKE '%KeyWord%' > > > OR Track16 LIKE '%KeyWord%' > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

