Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个 varchar 字段;
Substrg -------- 38-40week 8month 7 40 38-40week
我只想获取数字,例如:
38-40 8 7 40 38-40
我试过这个,但它不起作用......:
select SUBSTRING(Substrg, PATINDEX('%[0-9]%', Substrg), LEN(Substrg))
我能怎么做?谢谢
select replace ('38-40week', SUBSTRING('38-40week', PATINDEX('%[a-z]%', '38-40week'), LEN('38-40week')),'')