Hi,
I have two different data table.
1st table looks like:
Account Num
123456 234567
2nd table looks like

Now I want to find the unique element in between those two datable and want to store the result in another datatable.
Thanks in advance
Hi,
I have two different data table.
1st table looks like:
Account Num
123456 234567
2nd table looks like

Now I want to find the unique element in between those two datable and want to store the result in another datatable.
Thanks in advance
Hi @ssinha1 ,
check this once
What is “unique element” in your example?
345678?
What if 1ts table contains also 456789?
Would it be also “unique element” to be stored?
Cheers
yes, and in my case 345678 is the unique element and want to store this value in different dt.
Does it mean you need full outer join like in the picture?

So you want to make left join excluding right?

A = table2
B = table1
In that case use the following code
list = (From d2 In dt2.AsEnumerable
Where Not dt1.AsEnumerable.Any(Function (d1) d1(0).toString.Trim.Equals(d2(0).toString.Trim))
Select r=d2).toList
yeah this can also work.
And indeed the solution proposed by @Davuluri_Manikumar gives the same result and is even easier… ![]()
Cheers