Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shift month numbers for FY start
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Shift month numbers for FY start
Divers
Thread ID:
00929339
Message ID:
00929339
Vues:
47
Math question:
I need to shift the month numbers (1-12) by a variable amount for each company so that the proper month is listed for each month number.

IOW, if their Fiscal Year starts in month 4, their month 1 should be listed as April.

I have a table of conventional month numbers (1=January).

I can do this with a relatively complex ICASE when monthnum-fystart < 1, but I was hoping to do it with a simpler mathematical formula using additon, subtraction and MOD (%).

Any suggestions?
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform