Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UPDATE... SET... FROM x
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