-
openquery help
I want to update the table on a linked server with data from a table on my server.How can I do this using openquery ? when I tried using openquery passing linked server , it does not recognise the database myDB as it is on my server.
Any suggestions to accomplish the below statement using linked server....
UPDATE
LinkedDB.dbo.tVendorMMStest
SET
LinkedDB.dbo.tVendorMMStest.VendorName=myDB.dbo.tVendorMaster.VName,
LinkedDB.dbo.tVendorMMStest.KeyDate= getdate()
FROM
myDB.dbo.tVendorMaster
WHERE
LinkedDB.dbo.tVendorMMStest .VendID= myDB.dbo.tVendorMaster.VendorNumber
-
Re: openquery help
First try checking the required permission for creating the link to the other database.
If so, create the Database link, and then use that DBlink to access to the remote DB table.
-
Re: openquery help