I am comparing two tables on different Servers and the query I am running looks like this:
Select top 100 *
From [ServerA].[MyDB].[dbo].[Table1]
Where Exists( Select * from [ServerB].[TheirDB].[dbo].[TableA1]
Where [ServerA].[MyDB].[dbo].[Table1].[foo] = [ServerB].[TheirDB].[dbo].[TableA1].[bar])
This is not working and throwing error 4104 on [ServerB].[TheirDB].[dbo].[TableA1].[bar] even though bar is a valid column and
Select * from [ServerB].[TheirDB].[dbo].[TableA1]
Works fine