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 -> Re: UPDATE... SET... FROM x

Re: UPDATE... SET... FROM x

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 22 Nov 2005 07:42:30 -0800
Message-ID: <1132674147.224291@yasure>


gilb wrote:
> Hi, I'm having trouble working out the Ora equvalent of the following.
> I'm merging two rows, the row I'm using to update the first will
> populate any columns which have a null value.
>
> UPDATE #Temp
> SET A1= ISNULL(#Temp.A1, st.A1),
> K2 = ISNULL(#Temp.K2, st.K2),
> K3 = ISNULL(#Temp.K3, st.K3),
> K4 = ISNULL(#Temp.K4, st.K4)
> FROM SubmissionTenancy st
> WHERE #Temp.EntityRefLink = st.EntityRefLink
> AND st.submissionref = @submissionref
>
> Any help would be great.

Posting here is not a substitute for reading. Posting syntax from some other product and expecting others to do yor work for you is the high point of laziness.

You are getting paid the $/Euros/Yen so you look it up: http://tahiti.oracle.com

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue Nov 22 2005 - 09:42:30 CST

Original text of this message

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