Posted - 12/04/2012 : 14:58:51
| I am trying to run an update on a table to transfer an id field to an id field in another table where the forename = forename and surname = surname.
In MS Access, I would use:
INNER JOIN mar
ON MyEmployees.FirstName = mar.FirstName
AND MyEmployees.LastName = mar.LastName
SET mar.extraid = Myemployees.employeeid
but in SQL Server 2005 I get errors.
Would the correct TSQL be:
SET Mar.employeeid = Myemployees.EmployeeID,
INNER JOIN Myemployees ON Mar.Firstname = Myemployees.FirstName
AND Mar.Surname = Mar.Surname
Thanks for any help.