Find 3rd Instance of '/'

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Quality Assurance and Testing Meta

Q&A about the site for software quality control experts, automation engineers, and software testers

DECLARE @str VARCHAR(50)
SET @str = '/one/two/three/whatever/testing'
SELECT SUBSTRING(@str, 0, CHARINDEX('/', @str))

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results