Use of BETWEEN and DATETIME

  • Comments posted to this topic are about the item Use of BETWEEN and DATETIME

  • Straight forward question. Thanks.

    Thanks

  • Thanks for the question.

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

  • Thanks for the question

    M&M

  • A little bit tricky. For me it's impossible to notice the reverted order of assignments before a coffee.



    See, understand, learn, try, use efficient
    © Dr.Plch

  • Failed (before coffee :doze: ). Urrrggghhh...

  • I missed it. My bad for not reading the code accurately enough.

    Though, with the reversed order of the assignments, one might ownder if the author was trying to educate us something, or if he was us trying to trick us. I would have liked the question more without that trick,


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Interesting Question, revising about the issue. Thanks.

  • OK, if I'd read the question a bit more carefully I would have noticed the reversed assignments.

    However, I do wonder if the principal purpose of QOTD is to trick or to educate. If it is to trick, this question worked perfectly with me. If it is to educate, I'm less sure...

  • Failed! - Got too fixated about the time element and missed the order of the between dates

    -------------------------------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

  • Thank you for the question,

    Regards,

    Iulian

  • Thanks for the question - I have to agree though, that the effort in the question seems more set to trick than to test actual knowledge.

    Guess it makes one double and triple check all questions, as it was set up to be an interesting question even without the trick aspect! I wonder how many people would have got the right answer even without the trick?

  • A trick question with @DATE1 and @DATE2 being swapped but shows the care that is needed when having similar named fields.

  • Of course, failing the question I will argue that this question should be under the category (yet to be added) READING... 😉

  • Dwayne - hope everbody out there is a Red Dwarf fan.

    The Cat.

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

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