Re: IsNumeric() clause in MySQL??
Posted by:
Cai Black
Date: November 24, 2008 04:43PM
Since the REGEXP function is aware of character class (and the you would not be using the back-references creating by the parens in the regexp), the following is a bit simpler and more straight-forward, IMHO:
CREATE FUNCTION ISNUMERIC (myVal VARCHAR(1024))
RETURNS TINYINT(1) DETERMINISTIC
RETURN myVal REGEXP '^[\-\+]?[[:digit:]]*\.?[[:digit:]]*$';
Subject
Written By
Posted
September 10, 2004 12:08PM
September 16, 2004 10:31PM
February 02, 2005 01:37PM
Re: IsNumeric() clause in MySQL??
November 24, 2008 04:43PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.