Hi Friends
I have 2 Data Tables as DT1 and DT2, in which DT1 contains DT2 values, I want to remove those DT2 values from DT1, how can i achieve that, Anyone please help
Hi Friends
I have 2 Data Tables as DT1 and DT2, in which DT1 contains DT2 values, I want to remove those DT2 values from DT1, how can i achieve that, Anyone please help
Hi @Manii_K
filteredDT = DT1.AsEnumerable() _
.Except(DT2.AsEnumerable(), DataRowComparer.Default) _
.CopyToDataTable()
Or
filteredDT = (From row1 In DT1.AsEnumerable()
Where Not (From row2 In DT2.AsEnumerable()
Select row2.ItemArray).Contains(row1.ItemArray)
Select row1).CopyToDataTable()
Regards,
Thanks @lrtetala It’s working
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.