List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 18 1999 9:38pm
Subject:Re: Help with LIKE statement.
View as plain text  
On Sat, 1999-09-18 13:35:59 -0400, James Manning wrote:
> > I need to find all keyword matches in one field.
[...]
> 
> WHERE
>       field LIKE "% keyword %"
>    OR field LIKE "keyword %"
>    OR field LIKE "% keyword"
> 
> I'd imagine there's a REGEXP you could do instead, but that might
> be painful... as it stands, though, there doesn't appear to be any
> chance you could use an index, so perhaps a REGEXP isn't horrible...

And such a REGEXP could be

  WHERE field REGEXP '[[:<:]]keyword[[:>:]]';

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
Help with LIKE statement.LBFan991118 Sep
  • Re: Help with LIKE statement.James Manning18 Sep
    • Re: Help with LIKE statement.Martin Ramsch19 Sep
      • Re: Help with LIKE statement.James Manning19 Sep
        • Re: Help with LIKE statement.Martin Ramsch19 Sep
      • Re: Help with LIKE statement.Danny Carroll19 Sep
  • Help with LIKE statement.Michael Widenius19 Sep
    • Re: Help with LIKE statement.James Manning20 Sep
      • Re: Help with LIKE statement.Matthias Urlichs26 Sep
        • Re: Help with LIKE statement.Michael Widenius26 Sep
Re: Help with LIKE statement.James Manning19 Sep