February 26, 2011 at 10:57 pm
Comments posted to this topic are about the item The Percent Sign in T-SQL
The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
February 26, 2011 at 10:57 pm
Easy one 😀
M&M
February 27, 2011 at 11:46 pm
Thanks for easy question. 🙂
February 28, 2011 at 1:04 am
easy one, thanks
Iulian
February 28, 2011 at 1:36 am
Nice and easy, good for a Monday morning. Thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 28, 2011 at 2:52 am
Nice easy one to start of the week, cheers. 😀
_____________________________________________________________________
[font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]
February 28, 2011 at 4:05 am
Thanks.
It would have been nice to have a shortcut for 0/0 (divide zero by zero) :-).
February 28, 2011 at 8:02 am
I got this right but...
SELECT 0%0
gives
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
So it seems you can use it to divide 0 by 0 and get an error.
February 28, 2011 at 8:41 am
mtassin (2/28/2011)
I got this right but...SELECT 0%0
gives
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
So it seems you can use it to divide 0 by 0 and get an error.
🙂
This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])
February 28, 2011 at 9:05 am
So happy that over 80 percent of us know math.
Can you imagine how hard it would be a SQL developer or DBA if you didn't learn higher level math?
February 28, 2011 at 9:08 am
mtassin (2/28/2011)
I got this right but...SELECT 0%0
gives
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
So it seems you can use it to divide 0 by 0 and get an error.
Seriously? 😛
February 28, 2011 at 9:17 am
sknox (2/28/2011)
mtassin (2/28/2011)
I got this right but...SELECT 0%0
gives
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
So it seems you can use it to divide 0 by 0 and get an error.
🙂
This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])
Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.
p.s. To be more clear, it looks like a small zero divided by zero: 0/0.
The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
February 28, 2011 at 9:29 am
I feel so silly for selecting the wrong answer - which was so obviously wrong..I am humbled. Thank goodness it's Monday so I can blame something 😀
February 28, 2011 at 9:54 am
mtillman-921105 (2/28/2011)
Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.
p.s. To be more clear, it looks like a small zero divided by zero: 0/0.
Gotta be careful with jokes... as I said, I got this one right.
But somebody else could have said "Hey if I modulus 0 by 0 I get a divide by zero error!" and selected the last option, not realizing you were referring to what the % sign looks like. 🙂
February 28, 2011 at 9:59 am
mtassin (2/28/2011)
But somebody else could have said "Hey if I modulus 0 by 0 I get a divide by zero error!" and selected the last option, not realizing you were referring to what the % sign looks like.
Which would mean nothing unless they could find documentation supporting the obvious wrong answer. It was a multiple choice question with one right answer.
Test taking 101 tells us to select the answer that is MOST correct.
That was answer 3.
I like it when there are joke answers that are funny IF you understand the questions, or what you are reading. It has been proven that these questions improve learning.
Viewing 15 posts - 1 through 15 (of 24 total)
You must be logged in to reply to this topic. Login to reply