There is a table that holds long code string. I do need to select only short codes in between multiple parentheses inside the string.
I was using this:
SELECT
Code,
SUBSTRING(Code,CHARINDEX('(',Code)+1,(CHARINDEX(')',Code)-CHARINDEX('(',Code))-1) AS CodeSplit
FROM
#temp1
It only returns the value in the first parentheses, but I do need it to loop and return codes from all of the parentheses within the string.
Any ideas how to do this?