May 23, 2008 at 11:26 am
Good morning,
Greetings everybody,
Sorry, I forgot if I can use the function MOD in SQL SERVER 2000 and the sintax, I'm working in generating even numbers... so I need the function MOD for getting the remainder when you divide two numbers...right???
I'm sorry to bother... I'd appreciate any help.... thanks a lot 😀
May 23, 2008 at 11:38 am
Mauri:
%
Yes - that's right. That's the Modulo operator.
14 % 8 = 6
One small note. For better or worse, Microsoft allows the modulo result using the same sign as the left operand, so
-14 % 8 = -6 --<-- instead of the "Euclidean Modulo" value, which should be 2 in this case (Euclidean modulo means Modulo result should ALWAYS be positive).
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
May 23, 2008 at 11:51 am
Thanks a lot Matt!
I had forgotten this completely...
May 23, 2008 at 11:58 am
You're welcome!
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply