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.
値「asdf_dd_adf34asdf_sdf」で変数aaaの単語「asdf」をカウントするにはどうすればよいですか?
DECLARE @aaa varchar; SET @aaa = 'asdf_dd_adf34asdf_sdf';
単語の出現を削除すると何文字なくなるかを数え、単語の長さで割ります。
(len(aaa) - len(replace(aaa, 'asdf', ''))) / len('asdf')