Skip to content
Advertisement

Extract the Folder Names and Levels from paths SQL Server / ORACLE

Assuming I have a dataset like this:

Source Data

What I need to do is to make a dataset like this in SQL Server. Any help is appreciated:

Expected Output

Code on pastebin: https://pastebin.com/SjGbD6Cc

Advertisement

Answer

Perhaps this will help

Example

Returns

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement