If i have xml datatype columns in table then if i run distributed query for linked server will give error.
SELECT * FROM linkedservername.Database2.dbo.Table1 will give error "Xml data type is not supported in distributed queries." So i tried by using following
select Cast(Xml_abc as XML) as Xml_abc from OPENQUERY([linkedservername],'SELECT Cast(Xml_abc as NVARCHAR(MAX)) as Xml_abc FROM Database2.dbo.Table1')
here Xml_abc is column name with xml datatype.
The query resulted in showing rows with only xml_abc column.
But if i want full table to display then what should i do?Because i have so many column in table and only one column with xml datatype.So giving every column name in select statement is difficult for me.Is there any shortcut method to do it?