Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Select part of a text string...

$
0
0
I have a problem where I need to select all top level file paths from a string value in SQLSo I have a column "Locations"Example Data:X:\folder\anotherfolder\X:\folder\yet another folder\X:\foldername\another folder\X:\foldername\yet another folder\I'd want to return only:X:\folder\X:\foldername\So I am guessing I need to somehow parse the sting and capture anything before the second '\'?Any help would be greatly appreciated!

Viewing all articles
Browse latest Browse all 3145

Trending Articles