Linq for Full outer join

Hi,

Can someone help me with a linq query for full outer join to be written in assign activity.
IF i use join activity for joining 2 table on “Full”, it doesnot return non matching rows.

I need both matching and non matching rows in output

@garimavarshney9

Can you send the sample input

UiPath | LINQ Join Function | Inner Join | Left Outer Join | Right Outer Join | Full Outer Join - YouTube

1 Like

from my KB :slight_smile:

// full outer join
image

// full outer join is a logical union of a left outer join and a right outer join. LINQ does not support full outer joins directly, the same as right outer joins.

lst = (From d2 In dt2.AsEnumerable
Where Not dt1.AsEnumerable.Any(Function (d1) d1(0).toString.Trim.Equals(d2(0).toString.Trim))
Select row=d2).toList.Union(
(From d1 In dt1.AsEnumerable
Where Not dt2.AsEnumerable.Any(Function (d2) d2(0).toString.Trim.Equals(d1(0).toString.Trim))
Select row=d1).toList).toList

1 Like

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