-
I've been looking around for this all day. Is there anyway to determine if a non number variable can be converted cleanly to a number? In other words the equivalent to an IsNumber function in Oracle.
I have some garbage data that I'm attempting to clean up and I'd like to pull the numeric data from a column and put the data that is alphanumeric into a comment column.
Thanks.
-
Code:
CREATE OR REPLACE FUNCTION IsNumber (p_in VARCHAR2)
RETURN VARCHAR2 IS
dummy NUMBER;
BEGIN
dummy := p_in;
RETURN 'True';
EXCEPTION
WHEN OTHERS THEN RETURN 'False';
END;
/