Joining Multiple DataTables In Dynamic Way without duplicates

Hello,

I need to Join 6 tables by avoiding duplicate rows is there any way to dynamically join the data tables,

please find the excel attached which contains data and i need to merge the 6 tables or more and generate output as in expected output sheet

Output.xlsx (13.7 KB)

You can use code like this:

dt1.Merge(dt2, true, MissingSchemaAction.Ignore)
dt1 = dt1.DefaultView.ToTable(true, "Column1", "Column2", "Column3")
dt1.Merge(dt3, true, MissingSchemaAction.Ignore)
dt1 = dt1.DefaultView.ToTable(true, "Column1", "Column2", "Column3")
dt1.Merge(dt4, true, MissingSchemaAction.Ignore)
dt1 = dt1.DefaultView.ToTable(true, "Column1", "Column2", "Column3")

Thanks, how does this query work?

Well, i see your expected output does not match the explained post… if you need your excel to have duplicated columns (you have several columns named ´Result’), then you will have to use Write Cell activity and write cell by cell.

No I was able to join but the thing is that I am joining two tables geting output again joining another table with the before output is there any way where I can merge all my tables in a stretch is my question?

You can use some of the loop activities do do it dynamically… Use a list of datatables.