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: Wild_Numbers!

Re: Wild_Numbers!

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Wed, 02 Dec 1998 10:39:32 +0800
Message-ID: <3664A864.F35@bhp.com.au>


Dana Stockler wrote:
>
> | I'm currently retraining for Oracle and have managed to bet my Christmas
> | turkey (well not quite ) that
> | a wildcard exists when conducting a search to specify numerical data ONLY
> | ie. to exclude all else. Now
> | I sincerely hope someone can back me up here and actually identify this
> | legendary wildcard and its operation.
>
> I'm not aware of any such wildcard.
>
> IMHO: Oracle is very weak as regards regular expression pattern matching.
> I have often needed (wanted?) functionality similar to what you describe.
>
> It just occurred to me that maybe I could write a stored function to
> implement
> some form of RegExpPatMat. If I ever get my head above water here I'll give
> it a try.
>
> Dana

function is_number(x varchar2) return vachar2 is   y number;
begin
  y := to_number(x);
  return 'Y';
exception when value_error then return 'N'; end;

select *
from table
where is_number(col) = 'Y';

Not blindingly fast...
--



Connor McDonald
BHP Information Technology
Perth, Western Australia
"The difference between me and a madman is that I am not mad" Received on Tue Dec 01 1998 - 20:39:32 CST

Original text of this message

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