Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Currently I have a SQL agent on SER

Status
Not open for further replies.

snyderj

MIS
Mar 2, 2001
242
US
Currently I have a SQL agent on SERVER1 performing the following example daily task to copy selected data from one server to another:

SELECT IDENTITY (int, 1, 1) AS RowID, view1.*, 'XYZ' AS SourceSvr INTO database.dbo.table1 FROM [SERVER2].database.dbo.view view

It seems that using stored procedures may be a better approach. I know how to create a sp and execute it, but how do I do a SELECT...INTO? I may have cases where the data needs to be pushed from SERVER2, and where it needs to be pulled from SERVER1.

Thank you for your ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top