My guess is that you have nulls which won't satisfiy any condition ----- Original Message ----- From: "Richard Colman" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 10:11 PM Subject: RE: What does like '%%' mean
> It is not actually working that way, and I cannot figure out why. > > Here is what is happening: > > where first like '%%' - returns 2820 records > > where first like '%%' AND last like '%%' - returns 2820 records > > where first like '%%' AND last like '%%' AND company like '%%' - returns > 2752 records. > > shouldn't it return all 2820 records? As I add additional where clauses with > '%%' it gets worse, fewer and fewer records get returned. I have tried > #trim(field)# but that did not make any difference. > > Any ideas would be appreciated? > > -----Original Message----- > From: Douglas L. Brown [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 9:12 PM > To: CF-Talk > Subject: Re: What does like '%%' mean > > > It is keying on the fact that you left a field blank on the request. If you > have that in there it will pull all records with your search criteria and > disregard the fact that a field is empty. > > > > > Doug > > > ----- Original Message ----- > From: "Richard Colman" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, November 29, 2001 8:34 PM > Subject: What does like '%%' mean > > > > The studio drill-down wizard is generating SQL code that has a where > clause > > like: > > > > Members.First LIKE '%%' AND Members.Last LIKE '%#lastname#%' AND > > Members.Company LIKE '%%' AND Members.City LIKE '%%' AND Members.State > LIKE > > '%%' AND Members.Country LIKE '%%' AND Members.MemberType LIKE '%%' > > > > I am not getting the results that I expected to get. What exactly does a > > condition: > > > > field like '%%' > > > > actually filter on? > > > > Rick Colman > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists