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: Finding non numeric values - sql

Re: Finding non numeric values - sql

From: Mike S. <no email>
Date: Wed, 20 Nov 2002 01:08:03 -0800
Message-ID: <8sfmtu0ghcl2p0iu57nhvtpdfnmvq811i4@4ax.com>


David,

How about

'#' || ltrim(stringvar, '0123456789') <> '#'

The ltrim() returns a copy of stringvar with all leading digits removed. Then the result is tested to see if anything remains. The reason for concatenating '#' to the result is to avoid having an empty string to the left of the <>, as Oracle considers an empty string to be null.

On Wed, 20 Nov 2002 01:54:53 GMT, "david.garrett" <david.garrett_at_attbi.com> wrote:

>I'm trying to find a way to determine if a string holds any non numeric
>characters.
>For instance, I need to use a Decode to do one thing if a string like
>"6706A657987"
>has any non numeric characters and do another if it does not. In this
>example it has an "A" so it would need to be handled differently than say
>"6706657987". I played with Translate a little but it didn't really do the
>trick. Any suggestions?
>
>Any help is greatly appreciated.
>
Received on Wed Nov 20 2002 - 03:08:03 CST

Original text of this message

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