Logic or LINQ required for below Question

Hi All,

Data 1 we received as CSV file format it is like data table and having 1L rows data.
like database
And we receive one input file we have coulmn ID,
from that input file we need to compare CSV file coulmn “ID” if it maches the id means we need to get Name column and save into excel

Note : CSV file contain lakh datas so should we go with LINQ

else vb.net code also please suggest.

I attached the screen shot for better understanding. (I created sample one)



outputdt=dt1.AsEnumerable.Where(function(a) dt2.AsEnumerable.Any(Function(b) b(0).ToString.trim.Equals(a(0).ToString.trim))).CopyToDataTable

here dt1 is the CSV file and dt2 is Input File


Suppose i need to extract one more column in input means when id is matched what we need to add?


I need location and Priority from input sheet. (if ID match in Data 1 datatable)


use this expression in another assign activity below the above expression


you can add columnNames which ever columns you want

1 Like

Thanks @Shiva_Nikhil

1 Like

LINQ is fast right comparing other?


Yes it is faster

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.