Re: Pattern matching in Oracle.

From: DanHW <danhw_at_aol.com>
Date: 24 Aug 2000 23:16:36 GMT
Message-ID: <20000824191636.10137.00000646_at_ng-bd1.aol.com>


>Wonder if anyone can help.
>
>I have a data set where potentially one record could have upto 100 numerical
>fields, each numercial field being a floating point number between say 0 and
>5.
>I would like to run a query whereby I say something like: find me the
>records where field 20 has a value of 3.5 +/- 0.05, field 80 has a value of
>2.99 +/- 0.02, field 56 has a value of 1.34 +/- 0.04. This query may include
>all fields.
>
>Can this approximate searching or pattern matching be done somehow in
>Oracle?
>Is there a plugin or a cartridge that could enable such functionality?
>
>Hope someone can help.
>Thanks, Roland.
>
I don't know about the context cartridge, but you can do it in SQL using the BETWEEN operator...

select ... from ... where col80 between <value>-0.5 and <value> + 0.5.

If you want to get fancy, you can write a pl/sql function that evaluates it.

Dan Hekimian-WIlliams Received on Fri Aug 25 2000 - 01:16:36 CEST

Original text of this message