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: Inline Query ?

Re: Inline Query ?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 15 Aug 2003 01:39:24 -0700
Message-ID: <1a75df45.0308150039.18203333@posting.google.com>


The INSTR() function works better than TRANSLATE() in this case.

E.g.
 select
   trim(

       translate( lower('12983ABC187263goofy'),
         'abcdefghijklmnopqrstuvwxyz1234567890',
         '                                    '
                )
       )   TRANSLATED_RESULT,

   instr( lower('12983ABC187263goofy'), '##' ) INSTR_RESULT  from dual

Thus if INSTR() returns non-zero the phone number is invalid. That is pretty simple to DECODE() for a SUM().

--
Billy
Received on Fri Aug 15 2003 - 03:39:24 CDT

Original text of this message

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