参考https://bbs.csdn.net/topics/391895995
declare @str varchar(1000)='||MO21|TMT-0080|1|10' select convert(xml,'<r><a>'+REPLACE(@str,'|','</a><a>')+'</a></r>').query('r/a[4]').value('.','varchar(100)') /* TMT-0080 */
CONCATENATE(INDEXOFARRAY(split("A/B/C/D","/"),2) , INDEXOFARRAY(split("A/B/C/D","/"),3))
SELECT substring(aaa,charindex('/',aaa)+1,charindex('/',aaa,charindex('/',aaa)+1)- charindex('/',aaa)-1)FROM [dbo].[table]
aaa改成你的字段 table改成你的表 记得采纳