BETWEEN

  • Comments posted to this topic are about the item BETWEEN

  • Nice question - gets one back to the basics, which unfortunately we tend to forget.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Nice basic question. Good to have point added.

    --- babu

  • Aaah, an easy Monday morning question. Thanks Steve.

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

  • I couldn't believe, it's too easy!

  • Good thing I actually looked up the T-SQL definition of this before answering, because I wasn't sure if it should include the endpoints or not...the actual English word "between" is a little inconsistent on this point!

  • Nice and easy question to get the week started. Thank-you, Steve!

    Everyone: Have a great week ahead!

    Thanks & Regards,
    Nakul Vachhrajani.
    http://nakulvachhrajani.com

    Follow me on
    Twitter: @sqltwins

  • Nice question and good to start the week on a +1. Almost appeared to be too easy which made me stop and think before choosing my answer. Between is one of those words that can be interpreted different ways. Stopping and thinking before jumping in is perhaps a good thing to do - epecially on a monday morning. 😉

  • Nice QOTD to start the week.

    Thanks Steve.

  • I thought it would be too easy, without any trick, and i answered 5. I hoped, DATE fields have a time offset 12:00, but they haven't. 😀

  • bitbucket-25253 (3/3/2012)


    Nice question - gets one back to the basics....

    😎

    +1

    good question!!!

    thanks!!


    [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!
  • paul.knibbs (3/5/2012)


    Good thing I actually looked up the T-SQL definition of this before answering, because I wasn't sure if it should include the endpoints or not...the actual English word "between" is a little inconsistent on this point!

    I should have look up too :blush:

    It was "too easy" 😀

    Thanks!

  • Thanks for the easy question, and no tricks. Always good. 🙂

  • I too was looking for the trick in the question.

    First, it used DATE instead of DATETIME which gives you an error if you're using Server 2005. The Insert command would also not work on 2005.

    Then, the between was comparing string values. I had to guess that it would automatically convert those to date.

    To make things worse, it was using the date in yyyy/mm/dd format (or was it?). All those dates would still be valid in yyyy/dd/mm format too. What date collation was set on the server? Who knows.

    Anyway, I answered correctly but I have to admit it was just a guess this time.

  • This was a terribly difficult question: I spent 10 minutes looking for the syntax error, catch, gotcha, trip-up, etc., only to submit the straightforward, correct answer.:-D

    Rich

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

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