Power of implicit conversion

  • Comments posted to this topic are about the item Power of implicit conversion

  • An Interesting Question!

  • Easy, but interesting. Good way to start a Monday.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thank you for the question.

    Regards,

    Iulian

  • Excellent QOTD.

  • This question and the coffee help wake me up this morning - thanks

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Good question - shame there weren't more possible answers given, I only had to look at the first two, and would probably have got at least one of the others wrong if I'd had to guess at them!

  • Toreador (9/26/2011)


    Good question - shame there weren't more possible answers given, I only had to look at the first two, and would probably have got at least one of the others wrong if I'd had to guess at them!

    Or, you could have just looked at "C" and saw that '2' + '3' + 1 = 24 and none of the other possible answers had 24 as the answer. That excluded all others without even having to calculate anything else.

  • Great question.

    The precedence of operators, in that case, will make all the difference.

    Since it's math, if we use parenthesis, we'll get a different result as expected.

    SELECT '2' + '3' * 1 -- = 5

    GO

    SELECT ('2' + '3') * 1 -- = 23

    GO

    A good way to start the week. 😉

    Best regards,

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • Good question. Thanks for making me think on a Monday morning.

    http://brittcluff.blogspot.com/

  • Excellent! Just the right amount of grey cell stimulation for an early Monday morning. Thanks.

    Great example of taking two simple things you "know" (precedence and conversion) and synthesizing them into something greater than the two halves.

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn

  • good question!


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • I had to look at it for a minute, but I noodled it out. Good question, thanks.

  • Good question for a Monday.

  • That was an easy one... thanks!

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic. Login to reply