To check if a given string can be cast to a number, you can use the following CREATE statement:
CREATE virtual procedure views.isNumeric( IN to_test string )
RETURNS( is_numeric boolean )
AS
BEGIN
DECLARE double test = select cast ( to_test as double);
select true;
EXCEPTION e
select false;
END ;;
Comments
0 comments
Please sign in to leave a comment.