TomThomson (12/29/2014)
Iwas Bornready (12/29/2014)
I would never do it this way.I would.
It's much more fun than messing about with strings as Hugo suggests, because it provides useful mental excercise; but of course I'm no longer responsible for any production SQL code, so I can get away with it - - half a dozen years ago I would have regarded as criminal obfuscation. 😛
Heh... it's ironic that you used two dashes in your explanation because that will make it so no obfuscation is present.
SELECT correctformulahere --Calculate Christmas of Current Year
--Jeff Moden
Change is inevitable... Change for the better is not.