Type conversions and Nulls

  • Excellent question, Thanks so much.

  • Great question Tom, with a couple of wee pitfalls to lead the unwary, fortunately I had remembered my wits today. Superb explanation too.


    [font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]

  • ldorian81 (2/5/2013)

    I knew there was a trick to this one,

    really good question thanks 🙂

    Yes, I saw the NULL issue immediately, and then hit one of the checkboxes. Didn't even stop chewing my breakfast to contemplate datatype precedence. Nicely posed and explained.

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

  • Excellent question and explanation - several issues covered in one go - thank you.

  • Nice job with the question Tom.

    Jason...AKA CirqueDeSQLeil
    I have given a name to my pain...MCM SQL Server, MVP
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Great question and awesome explanation.

    Everything is awesome!

  • Good question and explanation Tom.


  • Great question Tom. My only complaint is that it was so well written there is no room for ambiguity or misinterpretation. 😉


    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Very nice question, and excellent explanation.

  • Great question, thanks Tom!

  • bitbucket-25253 (2/4/2013)

    nice question .. glad to see you contributing to the QOD to allow others to learn what you can teach.

    I've got a long way to catch up with your number of questions, Ron, and even further to go before my average question quality reaches any where near as high as yours.


  • john.moreno (2/4/2013)

    I got it right, but I wish the date wasn't April Fools day -- it adds a bit of "meta" distraction to the question.

    Is it ha, ha fooled you if you pick it, or ha, ha should have picked this? Either way, an unwelcome distraction from an otherwise nice question.

    Originally I had 28 December, but then thought "oh, people will expect a trick if I use that date" so changed it.

    PS There was some sort of typo or word missing trom the explanation.

    Yes, there was: "there" instead of "none", a very silly typo. I started with "if there isn't one of the tests which delivers true" or something similarly verbose and rotten style with a double negative like that, and decided to change it to "if none of the tests delivers true" and screwed up the edit.


  • Dineshbabu (2/4/2013)

    Nice one Tom.

    Tom I need ask you one thing.

    Is there any collation setting to affect the result of today's question ?

    Raghu has answered that one at least as well as I could. I think the collation got described because there was a different question fro which the collation mattered very much, and I was cutting and pasting. Similarly, the database name came from a question that had a "USE" statement for that db. Careless cutting and pasting, but those things may have helped get people to stop and think so I don't feel guilty about it. 😉


  • A great qotd and explanation. Had thunk it many times before getting it right... 🙂

    If I can answer a question then anyone can answer it..trying to reverse the logic.. :hehe:

  • Hugo Kornelis (2/5/2013)

    Very good question, and an awesome explanation. (Apart from one small type that you probably put in deliberately to prove that you're still human).

    Thanks, Tom!


    When I started reading language and collation settings I was sure it was going to be one of those controversial questions. Really glad to see it wasn't!

    Thanks a lot, Tom! 🙂

Viewing 15 posts - 16 through 30 (of 49 total)

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