Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how do I rewrite this query optimized
You could try using a view:
update (Select re.pk1col1
, re.pk1col2
, re.paid re_paid
, p.pt_fk1col1
, p.pt_fk1col2
, p.rtype p_rtype
From re, p where re.pk1col1 = p.pt_fk1col1 and re.pk1col2 = p.pt_fk1col2) set re_paid = (re_paid + decode(P_rtype ,'xx', (-1 * P_pt_amt) ,'yy', (-1 * P_pt_amt)));
-- Posted via http://dbforums.comReceived on Mon Jul 21 2003 - 16:22:41 CDT
![]() |
![]() |