Problem with comparing data tables

Hello

I have two data tables and I would like to compare them and return unique rows using:

image

First I make sure that my column names that I would like to compare are the same:

image

image

And I’m 100% sure that all three columns I’d like to compare in my both data tables are the same

However I’m getting an error when the activity I posted first tries to execute:

Do you have any ideas why that might be?

@marcin.chowaniec

finaldt=dt1.asenumerable.except(dt2.asenumerable.system.data.datarowComparer.deafult).copytodatatable

cheers

but not all columns are the same that is the problem, by saying duplicates i mean that I have three columns by which If they match I consider the row duplicate

@marcin.chowaniec

can you provide your input and expected output

cheers

Hii @marcin.chowaniec

Use this Linq

(From row1 In dt1.AsEnumerable()
Join row2 In dt2.AsEnumerable()
On row1.Field(Of String)(“ColumnToCompare”) Equals row2.Field(Of String)(“ColumnToCompare”)
Select row1).CopyToDataTable

Cheers…!