I have a use case where I want to be able to insert certain data rows from one database environment to another.
I have the grasp for how to copy from one database to another while on the same server by:
INSERT DB1.dbo.DataValue(DateStamp, ItemId, Value)
SELECT DateStamp, ItemId, Value
FROM DB2dbo.DataValue AS t
WHERE NOT EXISTS (SELECT 1 FROM DB1.dbo.DataValue AS d
WHERE DateStamp = t.DateStamp
AND ItemId = t.ItemId);
But I am unsure about how to do it over databases hosted on different servers. Ignoring the security aspect for now as well. Database version is:
Microsoft SQL Azure (RTM) - 12.0.2000.8
Any help would be greatly appreciated! Thanks!