For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > November 2005 > Re: Multiple update question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Multiple update question
ZeldorBlat

2005-11-01, 6:57 pm

Try this:

update A, (select B.b1, max(B.b2) b2
from B
group by B.b1
) as x
set A.a2 = x.b2
where A.a1 = x.b1

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com