Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dumb newbie question; how to identify numerics.
"nullpointer" wrote...
> What you can do is write a small function which checks if the feild is a number
> then u can use this function in the where clause of ur query.
>
> create or replace function is_number(v_str in varchar) return varchar2 is
> v_retval varchar2(1) ;
> v_temp number;
>
> begin
> v_retval := 'N';
>
> begin
> v_temp := to_number(v_str );
> v_retval := 'Y';
> exception
> v_retval := 'N'
> end;
>
> return v_retval;
>
> end is_number;
Hi,
a subtle correction:
in your exception you have to use pragma or when after
the word 'exception'.
Greetings,
Guido
Received on Fri Jan 31 2003 - 00:23:24 CST