I think you just have a misplaced parenthesis. try:
SELECT IF(r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;
On Tue, Jan 7, 2014 at 2:22 PM, Larry Martell <[email protected]>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?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql
>
>
--
- michael dykman
- [email protected]
May the Source be with you.