For each row activity consuming more time

Hello guys,

i have two data tables with 2 lakh plus data. I need to do lookup action and fetch results from one data table and update in another.

for each activity taking too much time kindly help me with .net code if we have any or any idea how can i reduce the time ?

Thanks in advance

often we can handle this with LINQ. May we ask you to share some sample rows from dt1 and dt2 with us along the expected output description. Thanks for support

Hello Peter,

Thanks for the reply,

i have attached excel file which contains dt1 and dt2 data, we have to look “SO Id” of dt1 in “so_id” of dt2 if data matches then we have to fetch corresponding columns data of “vertical”, “practice”, “region”, “grade”, “bu_desc pool_name” and “interview_required_by_customer” and update in dt1 data table by creating these columns in dt1.Test_file.xlsx (11.7 KB)

A Join Data Table activity might do the work.

Try this out:

Here are the results I got:
Test_file.xlsx (13.3 KB)



You have the option to build your logic using

  1. Filter DataTable
  2. LinQ Expression

For Reference check as below
For Each
Filter Datatable

Hope this may help you


I agree with Peter below, using LINQ is very handy just need to know the syntax but should perform well.

Thanks for the reply guys,

Left join works fine for me.

Asha T N

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