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.
例如,我有一个整数列 startMonth199812
199812
我需要下个月的它并返回一个整数199901。如何在一行中用 SQL 处理这个?
199901
如同
SELECT NEXTMONTH(199812)
将显示199901
不确定 sybase 语法,但我的方法是:
select case when startMonth % 100 = 12 then startMonth - 11 + 100 else startMonth + 1 end