List:General Discussion« Previous MessageNext Message »
From:Larry Martell Date:January 7 2014 7:44pm
Subject:Re: regexp in conditional
View as plain text  
On Tue, Jan 7, 2014 at 12:33 PM, Michael Dykman <mdykman@stripped> wrote:
> I think you just have a misplaced parenthesis.  try:
>          SELECT IF(r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;

Yes, thanks!

>
>
>
> On Tue, Jan 7, 2014 at 2:22 PM, Larry Martell <larry.martell@stripped>wrote:
>
>> Can I use an regexp in a conditional? I need to do something like this:
>>
>> SELECT (IF r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;
>>
>> I'm getting an error from that. Is there some way to do this?
Thread
regexp in conditionalLarry Martell7 Jan 2014
  • Re: regexp in conditionalPeter Brawley7 Jan 2014
    • Re: regexp in conditionalLarry Martell7 Jan 2014
  • Re: regexp in conditionalMichael Dykman7 Jan 2014
    • Re: regexp in conditionalLarry Martell7 Jan 2014