TRY_CONVERT smaller

  • Steve Jones - SSC Editor (2/18/2016)


    BWFC (2/18/2016)


    To be pedantic, it depends on what edition you run the code. I know that the unwritten rule is assume the latest version but many people testing that, like I did, will get the wrong answer.

    Still, I've got my point back by complaining about it 😎

    No points back. It doesn't depend on edition, or it shouldn't. It does depend on version. This is a 2012+ T-SQL construct.

    Version was the word I was looking for!


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • Also, I would like to know how many people would have selected NULL if that had been an option.

    I would have selected that. I was actually going to comment that when I saw the question I was going to answer Null. On finding that wasn't an option, "2" seemed the only answer that made sense.

  • That was a good question, learned somthing new, thanx.

  • Thanks for the question.

  • Nice question, thanks.

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

Viewing 5 posts - 31 through 34 (of 34 total)

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