oracle?mysql?SqlServer?
---------------------
WITH ta as (
select '1.60张三' [a]UNION ALL
SELECT '1.67张三Pro' UNION ALL
SELECT '1.60张三Pro' UNION ALL
SELECT '1.71张三Pro' UNION ALL
SELECT '1.71张三'
)
SELECT * FROM (
SELECT (CASE WHEN PATINDEX ('%[0-9]张三%',a)>0 THEN CONVERT(decimal(20,6),SUBSTRING(a,1,PATINDEX ('%[0-9]张三%',a))) WHEN PATINDEX ('%张三[0-9]%',a)>0 THEN CONVERT(decimal(20,6),SUBSTRING(a,PATINDEX ('%[0-9]张三%',a)+3,LEN(A))) ELSE LEN(ISNULL(SUBSTRING(A, PATINDEX ('%张三%',a)+2,LEN(A)),'')) END) [I],* from ta
) T ORDER BY T.I ASC,LEN(A) ASC