Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I do it optimally ?

Re: How can I do it optimally ?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 22 Jan 2001 19:25:16 +0800
Message-ID: <3A6C189C.48@yahoo.com>

luba_at_usb wrote:
>
> Alex Filonov <afilonov_at_pro-ns.net> ÓÏÏÂÝÉÌ × ÎÏ×ÏÓÔÑÈ
> ÓÌÅÄÕÀÝÅÅ:94g7qt$j8k$1_at_nnrp1.deja.com...
> > In article <949c74$1ng$1_at_news.ukrsotsbank.com>,
> > "luba_at_usb" <luba_at_usb.ua> wrote:
> > > How can I do it optimally ?
> > > update Tab1
> > > set Tab1.field2=(
> > > select sum (decode (field1,1,field2,0)+decode
 (field1,2,field3,0))
> > > from Tab1 where field1 in (1,2))
> > > where field1=1 ;
> > >
> >
> > Looks like it is optimal. Is it working too long?
> >
> It is working not long , but mayby you can do it another ?

It may be possible to update a join directly - check your doco for the prerequesites. Look for 'key preserved' views

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"
Received on Mon Jan 22 2001 - 05:25:16 CST

Original text of this message

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