Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Function to check if something is number
<alex.chenaki_at_gmail.com> wrote in message
news:1155679483.249748.32770_at_74g2000cwt.googlegroups.com...
> Does there exist an IsNumeric(..) or similar function in PL/SQL? If so,
> what is it?
>
> Thanks!
> Alex
>
Something like below what you're looking for? FUNCTION isnumeric( p_string IN VARCHAR2 )
RETURN BOOLEAN IS
v_number NUMBER(38) := 0;
BEGIN v_number := to_number(p_string);
RETURN TRUE; EXCEPTION WHEN value_error THEN
RETURN FALSE; END isnumeric; Received on Tue Aug 15 2006 - 18:02:36 CDT