Data table column value match

Dear Forum Member,

I have a scenario where i have two data table dt and dt1. in dt there are two column A and B. In dt1 there are also two column C and D.
My problem is if the any value of column C from dt1 matched with any value of column A of dt then the value of column D for matched row must be come in column B to the corresponding matched rows in dt. if not matched then there should be blank.

For ex. dt have two column

A B
X
Y

dt1 have two column

B C
X 12
Z 23

expected result for dt is

A B
X 12
Y
Please suggest me the LINQ Query for the same because i have lot of records in dt.
Thanks in Advance.

Hi @Yankit_singh ,

Refer below post

Regards,
Arivu

@arivu96 Thanks for the reply.

But i didn’t find any LINQ Query related to my problem.
Can you please share the exact query.

Thanks in advance.

Hi @Yankit_singh ,
Use join data table activity instead of linq. You can apply your condition in that activity refer below link for more info

Regards,
Arivu

You are not obliged to use LINQ in your case. For Each loops can do the same work here.

Try out this alternative. (This only works if the records in column A are unique, otherwise we can search for an alternative)

Best,
Charbel

you can do it with a left join LINQ statement

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