The error is:
Msg 9514, Level 16, State 1, Line 216
Xml data type is not supported in distributed queries. Remote object [Server_name].[DB_Name].dbo.[table_name]’ has xml column(s).
Are you trying to query a remote DB\table which contains an xml column? That is the reason behind this error.
Can this be done? Yes; you will have to have to use OpenQuery and Cast the xml column as nvarchar(max).
See Example below:
- Select * from OpenQuery(ServerName, ‘Select Col1, Col2, Col3, Cast(Col4 as NVarchar(max)) from [DB_Name].[Schema_Name].[Table_Name]’)
- How Big can NVarchar(max) Be? 2 GB (More Info)
- How Big can NVarchar(max) Be? 2 GB (More Info)
- Resources
Be the first to comment