How can I insert values from a query directly to a table in my database?
the query gets values from a linked server and i want to directly insert the results in my local database. This is how i thought would be done:
CREATE PROCEDURE dbo.SP_INSERTfromEXEC
ÃÂ ÃÂ ÃÂ INSERT INTO dbo.mytable
ÃÂ ÃÂ ÃÂ EXEC dbo.QuerytoLinkedServer
When i execute dboSP_INSERTfromEXEC procedure, then i get this error:
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "blahblah" was unable to begin a distributed transaction.
Now, when I execute dbo.QuerytoLinkedServer procedure, i do get the values, there is no error. It just doesn't want to insert it I suppose.
Any help would be greatly appreciated!
View Complete Post