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 -> update query question

update query question

From: Jack <j.cawkwell_at_open.ac.uk>
Date: 22 Oct 2004 13:59:24 -0700
Message-ID: <6ef7107a.0410221259.5b23c91e@posting.google.com>


I am trying to update the notification.notify_key if it is null, otherwise leave it unchanged. It should be set to the appropriate value from notify_temp.notify_key.

The following code sets it correctly on the first execution, then on the second execution it is set to null. This repeats cycling between a value and null each time. (not what is needed)

update notification nf set notify_key=(
  select
    decode(nf.notify_key,NULL, tm.notify_key,

                    nf.notify_key,nf.notify_key)
  from
    notify_temp tm
  where
    nf.d_machine_key = tm.d_machine_key (+) )

Any suggestions?

Thanks, Jack Received on Fri Oct 22 2004 - 15:59:24 CDT

Original text of this message

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