CodePudding user response:
- don't abandon trouble with this try
DECLARE @ STR varchar (2000)
Set @ STR='10 the FSF sf, [fdfd5661] fsd12'
Select
REPLACE (REPLACE (SubString (@ STR, CHARINDEX (' [' @ STR), CHARINDEX ('] ', the SubString (@ STR, CHARINDEX ('/', @ STR), CHARINDEX ('] '@ STR)))),' [', ' '), '] ', ' ')
CodePudding user response:
DECLARE @ STR varchar (2000)Set @ STR='10 the FSF sf + [fdfd5661] (fsd12)'
SELECT SUBSTRING (@ STR
, CHARINDEX (' [' @ STR) + 1
, CHARINDEX ('] '@ STR) - CHARINDEX (' [' @ STR) - 1
)
CodePudding user response: