Aki Karjalainen wrote:
Hi.

I've got a problem where I need to drop everything but numbers from a string and evaluate against it.

E.g. SELECT * FROM MYDATA WHERE DROP_ALL_LETTERS(MYSTRING) = '1254'
or
SELECT * FROM MYDATA WHERE REMOVESUBSTRINGS('A-Z', MYSTRING) = '1254'


10 points to the one whos knows how to do a query like that.





select * from mydata
where mystring regexp '[A-Z]*1[A-Z]*2[A-Z]*5[A-Z]*4[A-Z]*';

should do it.

Regards
Joseph Bueno


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to