Re: How to test for all digits in string

2001-04-27 Thread Bill Pribyl
Here are three slightly different versions of what you might be looking for. CREATE OR REPLACE FUNCTION isnum (thestring IN VARCHAR2) RETURN BOOLEAN IS holder NUMBER; BEGIN holder := TO_NUMBER(thestring); RETURN TRUE; EXCEPTION WHEN OTHERS THEN RETURN FALSE; END; / That

How to test for all digits in string

2001-04-26 Thread Woody Mckay
Hello gurus, Could someone tell me the best way to check a string to ensure that it contains all numeric digits before converting it to a number with to_number? I don't see a function like ISNUM. TIA, Woody -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Woody