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.
「10jnklgm51」などの文字列の最後の数字以外の文字を見つける方法。例で「m」を見つけるには、最も簡単な方法は何ですか?
最後の数字以外の文字は、逆文字列の最初の数字以外の文字です。したがって、次のようなものです。
select substring(reverse(str), patindex('%[^0-9]%', reverse(str)), 1)