I have two tables Employees
EmpID | EmpName | EmpDob
and WareHouseEmployeers
WarehouseEmpID | position | province
I need to update the Employee
table according to the WareHouseEmployers
table's values. How do I update the details about the employee table according to warehouse province and position?
I have tried this but it's not working:
UPDATE Employee
SET a.EmpName = 'Steven', a.EmpDob = '5-5-1990'
FROM Employee a, WareHouseEmployee b,
WHERE
a.EmpID = b.WareHouseEmpID
AND position = 'manager', province = 'central'
Can someone please help me to do that in SQL Server?