Re: Using TRANSLATE() to detect numeric strings

From: Jared Still <jkstill_at_gmail.com>
Date: Fri, 25 Jan 2008 12:06:31 -0800
Message-ID: <bf46380801251206n281347c2ud9b0725c1310bc02@mail.gmail.com>


LOL! I have that function, and in fact I believe I wrote pretty much the same thing about 10 years ago.

Just forgot about it.

IAC, I didn't try it, though I suspect it will be slower than the others.

I'll try it for comparison.

On Jan 25, 2008 8:41 AM, Niall Litchfield <niall.litchfield_at_gmail.com> wrote:

> Interesting indeed. I've always used the is_numeric function (and possibly
> indexed the column on it.)
>
> What's that I hear you say? You mean you don't have an is_numeric function
> available.
> Mine reads
>
> create or replace function is_numeric(p_stringval in varchar2) return
> number
> is
> l_numval number;
> begin
> l_numval := to_number(p_stringval);
> return 1;
> exception
> when others then
> return 0;
> end is_numeric;
> /
>
> I've never done the runstats thing though.
> On Jan 25, 2008 4:11 PM, Jared Still <jkstill_at_gmail.com> wrote:
>
> >
> > This week I found it necessary to differentiate between strings that
> > were composed of numeric data and those that were alphanumeric.
> >
> > This was kind of fun an interesting.
> >
> > It was also too long to post here, so I put it on my blog.
> >
> > http://jkstill.blogspot.com/ if you're interested.
> >
> >
> > --
> > Jared Still
> > Certifiable Oracle DBA and Part Time Perl Evangelist
> >
>
>
>
> --
> Niall Litchfield
> Oracle DBA
> http://www.orawin.info

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 25 2008 - 14:06:31 CST

Original text of this message