Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Arithmetic 1 Rate Topic Display Mode Topic Options
Author
 Message
 Posted Tuesday, February 28, 2012 8:41 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 4:44 PM Points: 5,323, Visits: 21,900
Post #1259233
 Posted Tuesday, February 28, 2012 8:43 PM
 Ten Centuries Group: General Forum Members Last Login: Wednesday, October 30, 2013 9:43 PM Points: 1,200, Visits: 1,070
 Good Question. Back to the basics. +1 to the total.
Post #1259235
 Posted Tuesday, February 28, 2012 10:10 PM
 SSC-Addicted Group: General Forum Members Last Login: Today @ 7:12 AM Points: 475, Visits: 658
 Good Question....
Post #1259253
 Posted Wednesday, February 29, 2012 12:38 AM
 UDP Broadcaster Group: General Forum Members Last Login: Today @ 2:07 AM Points: 1,449, Visits: 417
 Very interesting question. Learnt something new again.
Post #1259290
 Posted Wednesday, February 29, 2012 1:37 AM
 SSC-Addicted Group: General Forum Members Last Login: Today @ 1:24 PM Points: 408, Visits: 602
 The explanation I see is that on answers 1,3,4,5,6 implicit data types conversion happens because of mixing INT and CHAR types.On the answer 2, we just try to multiply 2 CHAR, therefore an error is raised up.Good question!
Post #1259310
 Posted Wednesday, February 29, 2012 1:41 AM
 Mr or Mrs. 500 Group: General Forum Members Last Login: Thursday, November 28, 2013 2:46 AM Points: 593, Visits: 95
 raulggonzalez (2/29/2012)The explanation I see is that on answers 1,3,4,5,6 implicit data types conversion happens because of mixing INT and CHAR types.On the answer 2, we just try to multiply 2 CHAR, therefore an error is raised up.Good question!Yeah, I have to agree, multiplying strings is the cause. It errors before it even tries to implicitly cast the answer to an int.
Post #1259314
 Posted Wednesday, February 29, 2012 1:45 AM
 UDP Broadcaster Group: General Forum Members Last Login: Today @ 8:49 AM Points: 1,465, Visits: 7,439
 I particularly like the fact that a QOTD was verified by several people before publication. BrainDonorLinkedinBlog Site
Post #1259316
 Posted Wednesday, February 29, 2012 1:48 AM
 Mr or Mrs. 500 Group: General Forum Members Last Login: Yesterday @ 3:30 AM Points: 576, Visits: 1,410
 It gives me this error on the 2nd blockMsg 8117, Level 16, State 1, Line 3Operand data type char is invalid for multiply operator.I guess E stands for ERROR? ww; Raghu--There are only 10 types of people in the world, those who understand binary, and those who don't.Note: (as of now) only.. 1 and 4 applies (i am on my way...)
Post #1259319
 Posted Wednesday, February 29, 2012 1:54 AM
 SSCrazy Group: General Forum Members Last Login: Today @ 10:56 AM Points: 2,219, Visits: 2,114
 This kind of error also is independent from version of sqlserver.You can not use - * / operators with chars
Post #1259329
 Posted Wednesday, February 29, 2012 2:34 AM
 SSCommitted Group: General Forum Members Last Login: Today @ 1:50 AM Points: 1,541, Visits: 5,606
 Yet another question that tells us not to rely on implicit conversion...
Post #1259357

 Permissions