How to Datatable.Select using 2 columns instead of 1


This is the code of getting unmatched rows using invoice number and now i want to another column invoce no + amount how can i do that on this linq?


dt_copy_mcConnect.AsEnumerable().[Select](Function(r) r.Field(Of String)(“INVOICE_NO.”)).Except(dt_mcConnect_CompleteDetailsCopy.AsEnumerable().[Select](Function(r) r.Field(Of String)(“INVOICE_NO.”)))

@joscares If you want to get unmatched rows based on column invoice number and amount. Try the below one

Var of type data table DT1 = DT.DefaultView.ToTable(True, "InvoiceNumber", "Amount")
  • DT is the variable of type data table that contains the actual data
  • DT1 contains the uncommon rows

These are the 2 datatables that I’m matching (dt_copy_mcConnect and dt_mcConnect_CompleteDetailsCopy) there will be match and unmatch right, on my code above i already getting the unmatch rows but i want to make my checker 2 columns instead of invoice no. only I want to add the amount as part of checking of unmatch rows