I need to pull a specific substring from a string of the form:
foo=abc;bar=def;baz=ghi
For example, how would I get the value of \"bar\" from t
This can achieve in simple way
DECLARE @str VARCHAR(30) DECLARE @start INT SET @str='foo=abc;bar=def;baz=ghi' SET @start=CHARINDEX('bar',@str) PRINT SUBSTRING(@str,@start,3)