I have the following code that returns an error message if my value is invalid. I would like to give the same error message if the value given is not numeric.
CREATE OR REPLACE FUNCTION IS_NUMERIC(P_INPUT IN VARCHAR2) RETURN INTEGER IS
RESULT INTEGER;
NUM NUMBER ;
BEGIN
NUM:=TO_NUMBER(P_INPUT);
RETURN 1;
EXCEPTION WHEN OTHERS THEN
RETURN 0;
END IS_NUMERIC;
/