DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS   SQL 2014 PROGRAMMING   DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
How to transfer data between linked servers?

Execute the following SQL Server T-SQL script with four-part addressing in SSMS Query Editor to transfer data from one linked server to another by appending. SalesOrderDetailID is automatically generated at target server:

USE AdventureWorks2008;

 

INSERT INTO [40.116.114.48].[AdventureWorks2008].[Sales].[SalesOrderDetail]

           ([SalesOrderID]/* ,[SalesOrderDetailID] */

            ,

            [CarrierTrackingNumber],

            [OrderQty],

            [ProductID],

            [SpecialOfferID],

            [UnitPrice],

            [UnitPriceDiscount],

            [LineTotal],

            [rowguid],

            [ModifiedDate])

SELECT [SalesOrderID]/* ,[SalesOrderDetailID] */

       ,

       [CarrierTrackingNumber],

       [OrderQty],

       [ProductID],

       [SpecialOfferID],

       [UnitPrice],

       [UnitPriceDiscount],

       [LineTotal],

       [rowguid],

       [ModifiedDate]

FROM   [20.156.44.88].[AdventureWorks2008].[Sales].[SalesOrderDetail]

WHERE  YEAR(ModifiedDate) = 2008;

Related link:

http://msdn.microsoft.com/en-us/library/ms190479.aspx

 

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE