Re: Search And Replace

From: Matt B. <gtimatt_at_home.com>
Date: Wed, 04 Jul 2001 18:19:58 GMT
Message-ID: <i7J07.11515$5Z5.3640188_at_news1.elcjn1.sdca.home.com>


"Jim Winter" <bravo113_at_lycos.com> wrote in message news:cFI07.20596$WT.3492579_at_typhoon.austin.rr.com...
>I want to search for a value and replace it if found.
>Example: If Member 20 or Member20, or Member 20 found then "Member"

Get an Oracle reference book - there are several built-in functions you can use to do this.

That said, here's an example:

DECODE(UPPER(SUBSTR(my_value,1,6),'MEMBER','MEMBER',my_value))

That is, look at the first six characters of my_value, force uppercase (to eliminate ambiguity for any mixed or lower case situations), if it's 'MEMBER' then return 'MEMBER' else return my_value.

[Quoted] Also look at the INSTR function as well.

-Matt Received on Wed Jul 04 2001 - 20:19:58 CEST

Original text of this message