Welcome to the community
Please try this
- Create an outputdt and use build datatable and create 4 string type columns
- Use assign as below
outputdt = (From d In dt.AsEnumerable Group d By k=d("Name").toString.Trim, k1=d("Age").ToString.Trim, k2=d("MID").ToString.Trim Into grp = Group Let g1 = String.Join(",",grp.Select(function(x) x("ID").ToString)) Let ra = New Object(){k,k1,g1,k2)} Select r = outputdt.Rows.Add(ra)).CopyToDataTable
Cheers
Please refer below link which helps to compare and merge two datatables using linq Query
Happy Automation
1 Like
Thanks @Anil_G. It worked.
Really appreciate your help.
1 Like
Thank you for the inputs @supriya117
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.