Hi
I have these 2 tables:
I need the rowNo (from the first table) of the matching Customer = custID
Can someone help with LINQ
Thanks
Hi
I have these 2 tables:
I need the rowNo (from the first table) of the matching Customer = custID
Can someone help with LINQ
Thanks
As it is on excel better to directly use a look up activity which will give you the excel row details directly
Cheers
Hello @chauhan.rachita30
You could read the two files into a datatable.
Then iterate the first one and use the “Lookup Data Tabel” activity to search for Customer based on Cust ID.
Take a look at the example below:
Regards
Soren
You can use LINQ to find matching entries between the two tables. For example, if both tables have a common column (e.g., “ID” or “Name”), you can use this LINQ query:
matchingRows = (From row1 In dt1.AsEnumerable()
Join row2 In dt2.AsEnumerable()
On row1(“ColumnName”).ToString() Equals row2(“ColumnName”).ToString()
Select row1).CopyToDataTable()
This will return all the rows from dt1
where a match is found in dt2
based on the specified column.
If you’re using the Join Data Tables activity, you can configure it to perform an inner join between the two tables:
dt1
and dt2
as the inputs.This will output a new data table containing the rows where the values from the specified columns in dt1
and dt2
match.
@chauhan.rachita30 try this method hope it work for you there i’m using join datatable
Cheers