September 27, 2009 at 10:35 am
How do I insert selected data from a linked server and insert it into the destination server?
For example:
I have a Table called Employee_Table in a remote SQL database named DatabaseSource (Linked Server named LinkedServer).
The Columns in Employee_Table are named columns EmployeeID (Value Number, 4), Employee FirstName, EmployeeLastName, ColumnNameA, ColumnNameS, ColumnNameD, ColumnNameD.
So I have this:
SELECT EmployeeID , Employee FirstName, EmployeeLastName, ColumnNameA,ColumnNameS, ColumnNameD,ColumnNameD
FROM LinkedServer.DatabaseSource. Employee_Table
Now how do I insert using the same query using MERGE to insert only new data from LinkedServer.DatabaseSource. Employee_Table?
(The destination data base named DestinationDatabase, destination table named Employees.)
INSERT INTO DestinationDatabase. Employees
The columns in Employees are named EmployeeNum (value Number, (prefix of 000000)10), EmployeeName, ColumnName1, ColumnName2, ColumnName3.
Now how do I schedule this to run as a weekly Job on every Sunday at midnight?
September 27, 2009 at 12:49 pm
duplicate post.
no need to cross post to multiple forums it fractures the answers you get and makes posters duplicate others work.
the "Recent Posts" link shows us everything.
continue the thread here:
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply