Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Cyclonik
Posting Yak Master
114 Posts |
Posted - 2006-02-02 : 13:00:55
|
| I am not really clear yet on proper syntax for Correlated Updates. I have the following update which does not work. I wrote this out just to get my intention across. UPDATE VehicleOwner set vo.PartyID = parent.newPartyIDfrom VehicleOwner vo join MatchPArty mp on vo.partyID = mp.partyid, (select Max(PartyID) newPartyID, groupid from MatchParty group by groupid) parent where vo.GroupID = parent.GroupIDI hope its clear what my intention is. |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-02-02 : 23:03:21
|
| Try this..UPDATE voset vo.PartyID = parent.newPartyIDfrom VehicleOwner vo join MatchPArty mp on vo.partyID = mp.partyidJoin(select Max(PartyID) newPartyID, groupid from MatchParty group by groupid) parent on vo.GroupID = parent.GroupID |
 |
|
|
|
|
|