March 3, 2012 at 3:09 pm
March 4, 2012 at 11:03 pm
Nice basic question. Good to have point added.
--- babu
March 5, 2012 at 12:37 am
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
March 5, 2012 at 12:53 am
I couldn't believe, it's too easy!
March 5, 2012 at 1:07 am
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!
March 5, 2012 at 1:50 am
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
March 5, 2012 at 1:54 am
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. 😉
March 5, 2012 at 2:23 am
Nice QOTD to start the week.
Thanks Steve.
March 5, 2012 at 2:31 am
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. 😀
March 5, 2012 at 3:58 am
bitbucket-25253 (3/3/2012)
Nice question - gets one back to the basics....
😎
+1
good question!!!
thanks!!
March 5, 2012 at 5:09 am
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!
March 5, 2012 at 5:24 am
Thanks for the easy question, and no tricks. Always good. 🙂
March 5, 2012 at 6:05 am
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.
March 5, 2012 at 6:44 am
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