Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Other SQL Server 2012 Topics
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sandeep S
Starting Member

1 Posts

Posted - 03/28/2014 :  00:35:37  Show Profile  Reply with Quote
Hi Friends,

Is there any way to find out the DELTA DATA between 2 tables which are residing on separate.Can anyone please help me on this?
This is the scenerio ,i had 2 tables Source and Destination.

In this source table Some rows the column values are different,i Need to Capture this Changed data or the difference between these 2 tables and want to put this on a 3rd table

Certain Condition are there,

1) No tool is allowed.
2) I had already tried the MERGE statement but it couldn't give me the solution i wanted.
3) Suppose some data in destination table are Old one ie, I had recently updated some rows in Source,Inserted some rows and deleted some rows also.I need to know the status in the new table whether its been deleted,updated or inserted .
4) And in the source table i had recently altered the table and added a new column,so the newly created table must have this column also.
5) It should be ok for all tables in the specified databases and the specified servers,ie Source database and destination database need not be in the same server.

6) I had one more doubt is there that From TRANSACTION LOG is it possible to get this information,if yes how? i already use the function fn_dblog(NULL,NULL) and DBCC by this i saw the data but its stored in hexa decimal format so i didnt understand how or what is happend in the table,Is it posible to obtain the solution through transaction Log read.if it how i can decode it?

Sample Source Table Data and Schema
-------------------------------------------------UserID UserName Dept Address
1 Liya Development Delhi

2 Jith Business Kochi

3 Vyshnavi HR Pune

4 Raj Admin Noida

5 Ravi Sr.DBA Kerala

Sample Destination Table Data and Schema

UserName Dept Address[/u][/b]
1 Liya Development RaiPur

2 Jithin Business Kochi

3 Vyshnavi DBA Pune

4 Raj Admin Noida

I just want the difference in data between the source and destination into a new table.In these 2 tables the source data and destination data are diffrent so i want that diffrence to be inserted into a new table is that possible?
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000