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 -> Search Replace String function

Search Replace String function

From: Anil G <anil.gothal_at_gmail.com>
Date: 9 Aug 2006 11:36:10 -0700
Message-ID: <1155148569.952818.154530@p79g2000cwp.googlegroups.com>


Does oracle provides search replace string functionality?

e.g. lets say i have data into column as '(A + B + C) - (D + E)' I would like to have following : (

NVL(SUM(DECODE(b.lookup_code,'A',a.q_qty,0)),0)  +
NVL(SUM(DECODE(b.lookup_code,'B',a.q_qty,0)),0) +
NVL(SUM(DECODE(b.lookup_code,'C',a.q_qty,0)),0)
) -
(
 NVL(SUM(DECODE(b.lookup_code,'D',a.q_qty,0)),0) +  NVL(SUM(DECODE(b.lookup_code,'E',a.q_qty,0)),0) )

In this case only thing needs to be done is search replace all values with
NVL(SUM(DECODE(b.lookup_code,??,a.q_qty,0)),0) Received on Wed Aug 09 2006 - 13:36:10 CDT

Original text of this message

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