I try to use linq but I facing some error, wich the result is null even the data is matching, and I dont know how to write the result in column “Result”
dt_Data.AsEnumerable().Where(
Function (row)
row(“ColumnA”).ToString.ToUpper.Trim.Equals(row(“ColumnB”)) And
row(“ColumnC”).ToString.ToUpper.Trim.Equals(row(“ColumnD”)) And
row(“ColumnE”).ToString.ToUpper.Trim.Equals(row(“ColumnF”)) And
).CopyToDataTable
Can you help me about my linq? Thank you and hope you understand what I’am saying because my english is bad.
(From d In dt.AsEnumerable
Let u =If(d(0).toString.equals(d(1).toString) And d(2).toString.equals(d(3).toString) And d(4).toString.equals(d(5).toString),“MATCH”,“NOT MATCH”)
Select dt.clone.Rows.Add(New Object(){d(0),d(1),d(2),d(3),d(4),d(5),u})).CopyToDataTable
When it is about updating a data column we keep in mind the potential and also limitation of LINQ e.g used within an Assign or increasing Black Boxes e.g. applied within an invoke code.
Good strategies are also to run for hybride approaches like comining for each row and LINQ within the execution block
Coming back to the part for ColA,B - ColC,D - ColE,F checks