Hello guys, today I’ll talk about queries with Linked Server and XML Data.
When you try to make a SQL Server query using Linked Server, and the table has an XML Data you will receive the following message:
It easy solves the problem, you need to use an OPENQUERY like this:
OPENQUERY ([Linked Server Name Here],
nvarchar1 as Name,
nvarchar2 as Description,
[DATABASE NAME].[SCHEMA].[TABLE NAME 1] as TB1
[DATABASE NAME].[SCHEMA].[TABLE NAME 2] as TB2 ON TB1.ID = TB2.ID
Group by …
So, you just create a new select using OPENQUERY called the Linked Server and inside you use the “original” query.
Enjoy, see you!