June 22, 2011 at 11:21 am
Learned something today....missed it though..
June 23, 2011 at 7:17 pm
Great Question Daniel, had to run it in SSMS to understand and get it right.
Learned something new.
June 23, 2011 at 8:46 pm
Nice question. I got so caught up wondering why you chose union instead of union all that I missed the smalldatetime. doh!
June 27, 2011 at 1:20 am
Good Question, but i got it worng and learn new thing.
Thx
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
July 2, 2011 at 11:47 pm
...of course the real take-home message is that you're much better off avoiding BETWEEN when dealing with datetime (or smalldatetime (or floating point)) data.
You can be sure you'll get what you intend to get if you instead write:
WHERE TStamp >= '2011-05-12 09:00:00' AND TStamp < '2011-05-13 00:00:00'
Edit:
Dagnabbit! Weird HTML formatting got me again. That should say >= and <
Don't know how to fix it though.
...One of the symptoms of an approaching nervous breakdown is the belief that ones work is terribly important.... Bertrand Russell
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply