I'm trying to create a hierarchy from a text field I have in my table.
Visually it is relatively easy to see who is parent and child.
For example: (see a screenshot of the table results)
1M
-----1M5
----------1M5.5445
----------1M5.6
AC
-----AC
----------AC.1
----------AC.2
----------AC.3
AD
-----AD.1
-----AD.2
-----AD.3
Note that the dot in the string is not always present and constant.
How can I proceed in order to build this hierarchy of parent, child which can have several levels?
Microsoft SQL Server 2012 (SP2-GDR) (KB3194719) - 11.0.5388.0 (X64)