February 26, 2015 at 11:04 am
Of course every sci fi person would know this, but it was fun seeing how you got to the answer. We now know the question.
February 26, 2015 at 11:33 am
February 26, 2015 at 12:57 pm
Shadab Shah (2/26/2015)
So Experts, which is the correct explanation. Either given by Eirikur Eiriksson or Toreador.
The one given by Toreador. The implicit conversion from -51 to varchar(1) discovers that '-51'is 3 characters, which is more than 1, so it delivers '*' to indicate that the the conversion was not possible.
Tom
February 26, 2015 at 1:48 pm
Excellent post , Toreador. You are right. The * means only that the value -51 cannot represent any ASCII character for which the minimum value is 0 ( maybe , in English , it means that or , if my remembrance is not too bad , SQL Server represents always invalid values by * ).
As soon as we know that , the "good answer" is evident. And if we know the numerical value for * ( 42 ) , that's 2 points easy to grab.
I hope that I have not written in an English too difficulty understandable.
February 27, 2015 at 12:57 am
Nice question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 27, 2015 at 2:03 am
patricklambin (2/26/2015)
Excellent post , Toreador. You are right. The * means only that the value -51 cannot represent any ASCII character for which the minimum value is 0.
Actually that's not what I said, and it's not true. The * means that "-51" is too long to fit into a varchar(1) field.
If you try ASCII("-51") you will get 45, which is the ascii value for "-" - the rest of the string is ignored.
June 9, 2015 at 12:29 am
Hahahaha yes 42 is the answer to everything
Viewing 7 posts - 31 through 36 (of 36 total)
You must be logged in to reply to this topic. Login to reply