How to update data in one table from corresponding data in another table and another SQL Server 2008?
I couldn't work with linked server as administrator didn't let me to do that. Therefore, I've imported the required tables in another database. Since source data is on another server, how can I update them? I appreciate quick reply as it is almost emergency. Thanks
Hoe this will help you. DECLARE @LastDatatime DATETIME SELECT @LastDatatime = MAX(audit_trail_date) FROM LogDB.LogTb INSERT INTO LogDB.LogTb SELECT column1, column 2... FROM (SELECT column1, column2.. FROM [LinkEDServer].[LogDB].[dbo].[LogTb] WHERE audit_trail_date > @LastDatatime)