Update with inner join ?
Posted
by phenevo
on Stack Overflow
See other posts from Stack Overflow
or by phenevo
Published on 2010-05-17T13:46:57Z
Indexed on
2010/05/17
13:50 UTC
Read the original article
Hit count: 242
sql-server
I have two databases:
DB1 and DB2
How to do something like:
update myServer.DB1.dbo.hotels.Name = myServer.DB2.dbo.hotels.Name
join myServer.DB2.dbo.hotels on myServer.DB2.dbo.hotels.Code= myServer.DB1.dbo.hotels.Code
where myServer.DB2.dbo.hotels.CountryCoe != myServer.DB1.dbo.hotels.CountryCode
© Stack Overflow or respective owner