i have datatables. DT1 has 10 thousand rows and DT2 has 8 thousand rows. They have a common column name ACCOUNT_NO. i want to match rows in Column1 from DT1 to any rows in Column1 from DT2 and write it to another DT. how can i achieve this?
Welcome to forum
For this for in this way
-
use read range activitiy to read the exc file and store in dt1
-
use another read range activitiy to read another file and store in dt2 variable
-
using join datatable activitiy and provide input as dt1 , dt2 with join type as inner and condition as column 1 = column1, and its output datatable create a variable called dt3
-
use write range to write the dt3 to excel file
Hope it helps
Mark it as solution if you got it
Nived N
Happy Automation
Welcome to forums
You can do this by using LinQ functions as you have huge data
Assign a new DT3 datatable variable and write as below
(From d1 In DT1.AsEnumerable
Join d2 In DT2.AsEnumerable
On d2(YourColumnNameOrIndex).ToString() Equals d1(“YourColumnNameOrIndex”).ToString()
Select d1).CopyToDataTable
Mark as solution if this helps
Thanks
2 Likes