Update Query with INNER JOIN between tables in 2 different databases on 1 server

后端 未结 11 1318
梦如初夏
梦如初夏 2020-12-08 09:29

Need some SQL syntax help :-)

Both databases are on the same server

db1 = DHE
db2 = DHE_Import

UPDATE DHE.dbo.tblAccounts 
INNER JOIN DHE_Import.dbo         


        
11条回答
  •  清歌不尽
    2020-12-08 09:39

    //For Access Database:
    UPDATE ((tblEmployee
    LEFT JOIN tblCity ON (tblEmployee.CityCode = tblCity.CityCode))
    LEFT JOIN tblCountry ON (tblEmployee.CountryCode = tblCountryCode))
    SET tblEmployee.CityName = tblCity.CityName, 
    tblEmployee.CountryName = tblCountry.CountryName
    WHERE (tblEmployee.CityName = '' OR tblEmployee.CountryName = '')
    

提交回复
热议问题