Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dumb newbie question; how to identify numerics.

Re: Dumb newbie question; how to identify numerics.

From: Guido Konsolke <Guido.Konsolke_at_triaton.com>
Date: Fri, 31 Jan 2003 07:23:24 +0100
Message-ID: <1043994092.68089@news.thyssen.com>


"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US