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.
月の整数である列stsmmがあります。MMの形で必要です。
私はこれを試しました:RIGHT('0' || cast(stsmm as char(2)), 2)しかし、それは機能しません。
RIGHT('0' || cast(stsmm as char(2)), 2)
ありがとう
これを使用してみてください:
select right(cast(100 + yourmonthcolumn as char(3)), 2)
この方法は常にMMで返されます
する必要がありますRIGHT('0' || cast(stsmm as varchar(2)), 2)
RIGHT('0' || cast(stsmm as varchar(2)), 2)