Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shift month numbers for FY start
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00929339
Message ID:
00929425
Vues:
12
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform