Hi.
I know that Access and SQL Server work slightly differently with Update queries.

My Access query is as follows which works fine.

UPDATE tblSites JOIN tblDevCom ON tblDevCom.DevComId = tblSites.DevComId SET tblSites.SiteName='::SiteName::', tblSites.DefEnd = ':efEnd::' WHERE (((tblSites.SiteId)=::SiteId: AND ((tblDevCom.Dev_Id)=:ev_Id:);


However, my SQL version updates ALL records, not just those that match the WHERE clause. (see below)

Can anyone tell me where i've gone wrong?
Thanks.

UPDATE tblSites
SET SiteName = 'Test 123'
WHERE EXISTS
(SELECT *
FROM tblSites INNER JOIN
tblDevCom ON tblSites.DevComId = tblDevCom.DevComId
WHERE (tblDevCom.Dev_Id = 1) AND (tblSites.SiteId = 20))