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: Sunday, January 4, 2015 7:55 AM Points: 5,333, Visits: 25,280
Post #1259233
 Posted Tuesday, February 28, 2012 8:43 PM
 Ten Centuries Group: General Forum Members Last Login: Thursday, August 18, 2016 9:14 PM Points: 1,369, Visits: 1,215
 Good Question. Back to the basics. +1 to the total.
Post #1259235
 Posted Tuesday, February 28, 2012 10:10 PM
 SSC Eights! Group: General Forum Members Last Login: Thursday, June 9, 2016 1:51 AM Points: 824, Visits: 1,029
 Good Question....
Post #1259253
 Posted Wednesday, February 29, 2012 12:38 AM
 SSCrazy Group: General Forum Members Last Login: Thursday, November 24, 2016 1:31 AM Points: 2,581, Visits: 621
 Very interesting question. Learnt something new again.
Post #1259290
 Posted Wednesday, February 29, 2012 1:37 AM
 SSC Eights! Group: General Forum Members Last Login: Tuesday, November 29, 2016 1:07 AM Points: 881, Visits: 1,341
 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
 Ten Centuries Group: General Forum Members Last Login: 2 days ago @ 9:08 AM Points: 1,076, Visits: 208
 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
 SSCommitted Group: General Forum Members Last Login: Yesterday @ 9:56 AM Points: 1,949, Visits: 10,989
 I particularly like the fact that a QOTD was verified by several people before publication. Steve HallLinkedinBlog Site
Post #1259316
 Posted Wednesday, February 29, 2012 1:48 AM
 SSCommitted Group: General Forum Members Last Login: Friday, September 16, 2016 10:22 AM Points: 1,574, Visits: 2,958
 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--The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
Post #1259319
 Posted Wednesday, February 29, 2012 1:54 AM
 Hall of Fame Group: General Forum Members Last Login: Monday, November 28, 2016 1:13 AM Points: 3,367, Visits: 3,190
 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
 SSCrazy Group: General Forum Members Last Login: Wednesday, November 30, 2016 2:06 AM Points: 2,251, Visits: 8,029
 Yet another question that tells us not to rely on implicit conversion...
Post #1259357

 Permissions