I want to do the below process using LINQ as the number of rows are high(around one lakh in each data table).
Note: I can not use join method because i want to compare using contains method which will not be in JOIN method.
I have two data tables(row count of each data table will be 1 lakh or more). What i have to do is i have to compare same column values in two data tables using contains method if they are equal then i have to bring column value to one of these data tables if they are not equal then i don’t want to do anything.
Dim counter As Int32
For Each row In dt1.AsEnumerable
If row("ColumnName").ToString.trim.Contains(dt2.Rows(counter).Item("ColumnName").ToString) Then
row("ColumnName")=dt2.rows(counter).item("ColumnName")
Else
row("ColumnName")=row("ColumnName").ToString
End If
counter=counter+1
Next