I have 2 excels sheet with huge data, i want to compare both the excel sheet. Few of the columns data is matching in both the excels sheets. Data which is matching need to be updated in Excel1 and the data which is not matching need to be updated in another Excel2.
I need the Query to compare two datatables. and the data which is matching need to be updated in different excel sheet
If the headers of both the excels are same then you can use the merge datatable activity to get the matching results.
For getting the unmatched results you can perform the minus operations on both the tables which will give you the result as datatable and you can simply write that datatable to excel using write range activity.
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: Job stopped with an unexpected exit code: 0xE0434352
SELECT *
FROM dbtest02.dbo.article d2
LEFT JOIN dbtest01.dbo.article d1 ON d2.id = d1.id
The left join shows all rows from the left table “dbtest02.dbo.article”, even if there are no matches in table “dbtest01.dbo.article”:
In this example, we are comparing 2 tables and the values of NULL are displayed if there are no matching rows. This method works to verify new rows, but if we update other columns, the LEFT JOIN does not help.
This can be done both ways to see if there are differences the other way around. This query will just return the 3 matching rows.
This is the best technique to compare two excels with huge data in MS SQL Server.