(From a In collectionsDT.AsEnumerable()
Group Join b In AgeingDT.AsEnumerable
On a(“Bank Invoice”) Equals b(“Document Number”) Into gj = Group
From g In gj.DefaultIfEmpty
Let slsa = If(isNothing(g), Nothing, g(1))
Let rapre = a.ItemArray.Take(2).Append(slsa)
Let rapost = a.ItemArray.Skip(3)
Let ra = rapre.Concat(rapost).toArray
Select r=dtResult.Rows.add(ra)).CopyToDataTable()
This query returns only matched records but along with matched records i need to get not matching records also.
Why dont you use a join activity directly(left join) and then a filter datatable to remove the columns that are not needed or retain only the columns needed
No anil actually I am doing vlookup with linq
In one excel i have some data which I have mentioned in above one excel is having old data another excel is having new data i need to replace old data with new data using ling
mapping the linq and the samples we would conclude:
when there is no right pairing row, then use null. But we do feel that your intention is to use the existing left value.
can you try: Let slsa = If(isNothing(g), a(ColNameOrIndexToEmail), g(1))
we assume that all other parts from the reused LINQ is clear and that the ItemArray reconstruction part is matching the involved datacolumn structures.