Comparing rows in data table

Hi @marcin.chowaniec ,

First create array of list for column names.

ColumnNames={“Column1”,Column2"}

Then,

NewDT=DT2.AsEnumerable().Where(Function(rowB) Not DT1.AsEnumerable().Any(Function(rowA) ColumnNames.All(Function(columnName) rowA(columnName).Equals(rowB(columnName))))).CopyToDataTable()

Thanks,
Sandhiya P

1 Like