September 27, 2009 at 10:57 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
September 28, 2009 at 9:53 am
My apology for cross posting in the forum…won’t happen again.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply