Compare two tables and write data only for same values

Hi, I have two tables with same and different values in column a. I need to write values from dt2.
Dt1:
image
Dt2:
image

Final dt:
image

Hi @markosc ,

Kindly refer below link, use join data table activity to join the table, you can provide the conditions in join wizard.

Regards,
Arivu

@markosc

You can use Join Datatable activity where you can give the condition as “a” = “a”

Hope this may help you

Thanks

No because with join the result is like this:
image

@markosc

You can check with different join Types, Try with Left and let us know

Hope this may help you

Thanks

@markosc

Use a Full Join datatype

Your case is a typical Join scenario. But only use = as operator
About Join types have a look here:

After joining the datata (result: dtJoin DataTable) just remove the unneeded Columns added by the Join activity by

  • using a Filter datatable (Col removal configuration)
  • dtJoin.DefaultView.ToTable(False, {“a”,“b”,“b_1”})

Rename later b_1 ColName to c by

YourDataTableVar.Columns(“b_1”).ColumnName = “c”

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