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

UPDATE... SET... FROM x

From: gilb <gilbertcj_at_gmail.com>
Date: 22 Nov 2005 04:10:27 -0800
Message-ID: <1132661427.838395.285180@f14g2000cwb.googlegroups.com>


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. Received on Tue Nov 22 2005 - 06:10:27 CST

Original text of this message

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