The table shows the column identifiers, heading, and ParentID. ParentID is used to identify the record in the same table that is considered its parent, so any record in which ParentID is NULL is one that is itself the parent.
I need a query that will go through each parent and display any below it (ideally with a hyphen or something that denotes its subordination) does anyone know how to do this or how to point me in the right direction?
(I studied T-SQL and read a lot of similar online questions, however my SQL is not sharp enough to figure this out, so I would really appreciate some pointers!)
source share