INSERT INTO with XML not Supported in Distributed Queries

G

Guest

I am trying to copy record rows into a linked server via the following SQL
syntax where XMLCol is an xml column type (note this is running in SQL
Express SP2):

INSERT INTO OPENDATASOURCE('SQLNCLI','Data
Source=MACHINENAME\SQLEXPRESS;Integrated

Security=SSPI').[MyDatabase].dbo.MyTable
([IndexKey]
,[FirstName]
,[LastName]
,[XMLCol]

SELECT [IndexKey}
,[FirstName]
,[LastName]
,[XMLCol]

FROM [MyDatabase].dbo.MyTable
WHERE [MyDatabase].dbo.MyTable.KeyIndex = 1

However when I run this query I get the following error from SQL Server
Manager Studio:

Msg 9514, Level 16, State 1, Line 1
Xml data type is not supported in distributed queries. Remote object
'OPENDATASOURCE' has xml column(s).

Further looking has taken me to "SQL Server 2005 Books Online
Guidelines for Using Distributed Queries" which states:
"Tables that have xml columns cannot be queried, even if the query accesses
non-xml columns of the table."

Does anyone know of a work around so one could use XML columns in
distributed queries?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top