Merge multiple rows in one

HI @ravindar.singh

How about this expression?

(From d In BuildDT.AsEnumerable
Group d By k=d("Booking No").toString.Trim Into grp = Group
Let nj = String.Join(" ",grp.Select(Function (n) n("Leading passenger 1").toString.Trim))
Let ra = New Object(){k,grp.First()(1),grp.First()(2),nj,grp.First()(4)}
Select r = DtOutput.Rows.Add(ra)).CopyToDataTable

Regards
Gokul

2 Likes