Click here to Skip to main content
14,331,044 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am trying to insert data to tables in remote DB via Linked Server I am getting exception on fetching data from Tables with Xml Column data type on executing below query .
i tried open query as below.
INSERT INTO OPENQUERY([LNK_228], 'SELECT CustomerDetailID, CustomerId, AccountNo, CustomerName, EmailIds, IsActive, IsDeleted, CreatedBy, CreatedDate, ModifiedBy, ModifiedDate FROM [FTS_DIB_ARCH2].dbo.CustomerDetails')
SELECT CustomerDetailID, CustomerId, AccountNo, CustomerName, EmailIds, IsActive, IsDeleted, CreatedBy, CreatedDate, ModifiedBy, ModifiedDate 
FROM FTS_DIB_ARCH_TEST.dbo.CustomerDetails

I also tried SELECT * FROM OPENQUERY([LNK_228], 'SELECT EmailIds FROM [FTS_DIB_ARCH2].dbo.CustomerDetails') for which same exception occurs.

Getting exception:Xml data type is not supported in distributed queries. Remote object 'OPENQUERY' has xml column(s).

What I have tried:

i tried open query for table with columns having Xml Column Type as below.
INSERT INTO OPENQUERY([LNK_228], 'SELECT CustomerDetailID, CustomerId, AccountNo, CustomerName, EmailIds, IsActive, IsDeleted, CreatedBy, CreatedDate, ModifiedBy, ModifiedDate FROM [FTS_DIB_ARCH2].dbo.CustomerDetails')
SELECT CustomerDetailID, CustomerId, AccountNo, CustomerName, EmailIds, IsActive, IsDeleted, CreatedBy, CreatedDate, ModifiedBy, ModifiedDate 
FROM FTS_DIB_ARCH_TEST.dbo.CustomerDetails

I also tried SELECT * FROM OPENQUERY([LNK_228], 'SELECT EmailIds FROM [FTS_DIB_ARCH2].dbo.CustomerDetails') for which same exception occurs.
Posted
Updated 26-Apr-16 19:54pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100