Ich habe eine Tabelle mit einem Feld namens PATH; Dieses Feld hat das folgende Format (jeder Datensatz ist eine neue Reihe):T-SQL 2008- Ermitteln Sie den höchsten Pfad
PartitionA \ PathA
PartitionA \ PathA \ Location
PartitionA \ PathA \ Location \ Share
PartitionA \ PathA \ Location \ Share \ FolderUserA
PartitionA \ PathA \ Location \ Share \ FolderUserA \ fileA.txt
PartitionA \ PathB
PartitionA \ PathB \ Location
PartitionA \ PathB \ Location \ Share
PartitionA \ PathB \ Location \ Share \ FolderUserB
PartitionA \ PathB \ Location \ Share \ FolderUserB \ fileB.txt
...
Ich mag die höchsten Ordner für jeden Benutzer erhalten. In diesem Beispiel möchte ich erhalten:
PartitionA \ PathB \ Location \ Share \ FolderUserA
PartitionA \ PathB \ Location \ Share \ FolderUserB