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')),'')