Comparing 2 Data tables

Hi Team,

Need to compare 2 data tables and return records that are not matched. Ex

Dt1 contains = 111, 222, 333
Dt2 contains = 222, 111, 444, 333

Output should return 444 not found in Dt1
Kindly share a sample file

Hello,

Can you do something like
For each row of dt1

  • Dt2.asenumerable.contains(valueofdt1)
    If not(append the value to a list of unmatched value)

The syntax os AsEnumerable is not good in my exemple, i will find the good one :slight_smile:

Any updates from any one ?

HI @Robotics

Check out the XAML file

Joindatatable.xaml (9.7 KB)

Output

image

Regards
Gokul

@Gokul your code works fine. I have a question here. I am adding 444 in dt1 which means bot dt1 and dt2 are equal now (values present in dt1 present in dt2 also) for this scenario i am getting an error - Runtime exception error - The source contains no datarows.

How to handle this error ?

Hi @Robotics

You can try with Try catch activity

Check out this Update XAML file

Joindatatable.xaml (11.5 KB)

Check out this tutorial

Regards
Gokul

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