Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shift month numbers for FY start
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00929339
Message ID:
00929425
Views:
11
This message has been marked as the solution to the initial question of the thread.
Hi Mike,

My son come up with simpler expression. :)
SELECT ((MonthNum + (12 - @fystart)) % 12 + 1) AS RealMonth ...
>>
>>Try
SET @RealMonth = (@MonthNum + @fystart - 1) % 12
>>CASE @RealMonth WHEN 0 THEN 12 ELSE RealMonth END
>>
>>
>Uhh... OK, but how do I include that within my TSQL select command...
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform