sybase - SQL: Next Month of Integer Date and return an Integer -


this question has answer here:

i have column startmonth integer, example 199812

i need have next month of , return integer 199901. how handle in sql in 1 line?

similar to

select nextmonth(199812) 

will display 199901

select case when startmonth % 100 = 12             startmonth - 11 + 100             else startmonth + 1        end 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -