In this table i have a Parentname and Subname columns and in this case given Parentnames is the parent of given Subnames

i was trying to do something like this:
STRING_AGG(ISNULL(Distinct ch.Name, ' '), '; ') ParentName
but it is getting error..Any Solutions?I dont want to duplicate this Parentname. i want it to be only one.

Mohsin ArifRank #732 · 3.2K reputationPosted Apr 29, 2019, 7:26 PM EDT
Amit KumarRank #459 · 5.4K reputationPosted Apr 29, 2019, 7:36 PM EDT