Hi All,
Please help me to achieve this condition-- How to concatenate the Item description with " ; " for similar tracking number from each row and get the Concatenet result in result column corresponding to that tracking number ?
Thanks,
Ritesh
Hi All,
Please help me to achieve this condition-- How to concatenate the Item description with " ; " for similar tracking number from each row and get the Concatenet result in result column corresponding to that tracking number ?
Thanks,
Ritesh
HI,
Can you try the following expression?
dt = dt.AsEnumerable.GroupBy(Function(r) r("Tracking Number").ToString).Select(Function(g) dt.Clone.LoadDataRow({g.Key,String.Join(";",g.Select(Function(r) r("Item Description").ToString))},False)).CopyToDataTable
Sample20230126-7L.zip (2.9 KB)
Regards,
Hi @Yoichi ,
Thanks for the help , yup its working. Could you please help me to achieve this then that would be great help for me. Actually this one was needed for me.
Thanks,
Ritesh
Hi,
How about the following?
dt.AsEnumerable.GroupBy(Function(r) r("Tracking Number").ToString).Select(Function(g) dt.Clone.LoadDataRow({g.Key,String.Join(";",g.Select(Function(r) r("Item Description").ToString)),g.Sum(Function(r) CDbl(r("Order Amount").ToString)),g.Sum(Function(r) CDbl(r("DTC COGS").ToString))},False)).CopyToDataTable
Sample20230126-7Lv2.zip (3.1 KB)
Regards,
Hi,
Awsome!!! Yoichi…
Regards,
Ritesh
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.