jenksonu said:
I'm trying to update all records in one table GCI.EmployeeName to House after
I add a check to y/n field in table2 EmployeeInfo
UPDATE GCI.EmployeeName to house WHERE EmployeeInfo.EmployeeName,
EmployeeInfo.Terminated = 'y';
Thanks in Advance for any help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The syntax is incorrect. Try something like this:
UPDATE GCI INNER JOIN EmployeeInfo
On GCI.EmployeeID = EmployeeInfo.EmployeeID
SET GCI.EmployeeName = 'House'
WHERE EmployeeInfo.Terminated = True
Hopefully, there's an EmployeeID in both tables.
Standard SQL:
UPDATE GCI
SET EmployeeName = 'House'
WHERE EmployeeID IN (SELECT EmployeeID
FROM EmployeeInfo
WHERE Terminated = True)
HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBSlcMp4echKqOuFEgEQIARwCgsHBlIIX2/wIV76t/P+tIEnm2PawAnizO
w0cO3+/w384nDxvXChuN805P
=txyT
-----END PGP SIGNATURE-----