I’ve followed examples from other posting to achieve this but am getting the following error:
The objects “otherDB.dbo.someTable” and “someDB.dbo.someTable” in the FROM clause have the same exposed names. Use correlation names to distinguish them.
Here’s the SQL Statement
UPDATE [someDB].[dbo].[someTable]
SET [someDB].[dbo].[someTable].[Name] = [otherDB].[dbo].[someTable].[Name]
FROM [someDB].[dbo].[someTable]
INNER JOIN [otherDB].[dbo].[someTable]
ON [someDB].[dbo].[someTable].[ID] = [otherDB].[dbo].[someTable].[ID]
As you can see, I simple want to update the [Name] in [someBD].[someTable] from [otherDB].[someTable]
From what I can see in other similar queries, this should work but I wonder if I need to do something different because it’s coming from a different database?
Any pointers/help much appreciated.
Have you tried using an alias?