Using SQL I'd like to return all text before the 3rd forward slash in a column
Since you said "quick and dirty", I'm assuming that this very quick and very dirty solution won't receive a bunch of down votes. The SQL below uses multiple
SUBSTRING() functions to find the third slash:
DECLARE @str VARCHAR(50) SET @str = '/one/two/three/whatever/testing' SELECT SUBSTRING(@str, 0, CHARINDEX('/', @str, CHARINDEX('/', @str, CHARINDEX('/', @str, CHARINDEX('/', @str, 0) + 1) + 1) + 1))
You can see a working example here.