I have two excel file. Both excel file contains Wage Type Text & Associate Name
I need to get the value which is available in dt1 & not in dt2
Similarly, the value avail in dt2 & not in dt1
Keep only the wage type text and associate name column in the both input table( remove the other columns) and use the following query.
dt_output1=if(dt_input1.AsEnumerable.Except(dt_input2.AsEnumerable,system.data.DataRowComparer.Default).any,dt_input1.AsEnumerable.Except(dt_input2.AsEnumerable,system.data.DataRowComparer.Default).CopyToDataTable,dt_input1.Clone) //Returns ID available only in the first table.
dt_output2=if(dt_input2.AsEnumerable.Except(dt_input1.AsEnumerable,system.data.DataRowComparer.Default).any,dt_input2.AsEnumerable.Except(dt_input1.AsEnumerable,system.data.DataRowComparer.Default).CopyToDataTable,dt_input2.Clone) //Returns ID available only in the second table.
Since, its comparing with Amount also . The highlighted row should not be avil in output file because with same wage type & associate name both dt1 & dt2 contains.
Note – The comparison between two file should be based on Column B & D only not with Amount column