Return to Snippet

Revision: 59855
at October 5, 2012 00:04 by ed_trench


Updated Code
UPDATE c
SET ContactId = ac.contact_id
FROM ATable AS c
INNER JOIN BTable AS ac ON c.Contact = (ac.surname + ', ' + ac.forename)

update c
set AreaCoordinator = cha.ContactId
FROM dbo.ATable AS c
INNER JOIN dbo.BTable AS cha ON c.County = cha.County

Revision: 59854
at October 4, 2012 23:48 by ed_trench


Initial Code
UPDATE c
SET ContactId = ac.contact_id
FROM ATable AS c
INNER JOIN BTable AS ac ON c.Contact = (ac.surname + ', ' + ac.forename)

Initial URL


Initial Description
SQL update examples using joins

Initial Title
SQL UPDATE using JOIN

Initial Tags
sql, update

Initial Language
SQL