Viewing 15 posts - 46 through 60 (of 203 total)
Dave62 (9/1/2010)
SELECT DATEADD(day, DATEDIFF(day, '20100101', CURRENT_TIMESTAMP), '20100101');
The only thing I don't like about this method is the hard-coded string. I suppose a dynamic expression could replace it but it...
September 1, 2010 at 9:07 am
This is an excellent question, thank you Hugo. It reminded me what my old chess computer says when in teaching mode:
The knight is a tough one. It moves like an...
August 31, 2010 at 10:55 am
This is an excellent question, thank you. I answered it correctly because for years I cannot find the answer to the following question: why would anyone ever consider casually using...
August 25, 2010 at 8:51 pm
kevin.l.williams (8/23/2010)
Interesting that this does not work the same way.select datalength(convert(varchar, getdate(), 101))
This is by design and has also been covered many times in recent QotDs. Forgetting to specify the...
August 23, 2010 at 10:49 am
Good question, thank you. I got it wrong because sadly I did not read the question carefully enough, and performed was the key. Running it does not produce any error,...
August 20, 2010 at 10:02 am
Nice question, thank you. I did not have to work with 6.5, because at the place of my employment we did not use SQL Server until, according to Microsoft developers,...
August 13, 2010 at 8:51 am
codebyo (8/7/2010)
Now why in Heavens would there be two different behaviours for the same datatype?Just to confuse people? Or is there a technical explanation for that?
This is a very good...
August 7, 2010 at 8:11 pm
Steve Jones - Editor (8/5/2010)
The typos have been corrected
Almost. The sys.dm_os_sys_info is still spelled as sys.dm_os_sys.info with the dot before info instead of desired underscore.
Oleg
August 5, 2010 at 10:14 am
Fozzie (8/5/2010)
What I've found a bit weird is, if you run SELECT @@ROWCOUNT by itself in a completely fresh window then you get 1 returned... slightly odd behaviour?
I think that...
August 5, 2010 at 9:29 am
mtillman-921105 (8/3/2010)
However, I can accept your line of reasoning, but I still don't agree.
I can easily accept your line. I know, however, that it happens more often than not that...
August 3, 2010 at 12:13 pm
Michael Poppers (8/3/2010)
The difference, Oleg, is that the 1st argument to ROUND() is a NUMERIC. I would nevertheless not want T-SQL's behavior to change :-).
This is true, but who...
August 3, 2010 at 11:17 am
mtillman-921105 (8/3/2010)
I think that this "feature" should be changed. Just because two numbers are integers, why assume the answer should also be an integer? :angry:
I would like to...
August 3, 2010 at 8:21 am
Nice question, I liked that it is clean and straightforward, no tricks. The column names in that table of yours are not very nice though. 😀
Oleg
August 1, 2010 at 8:57 pm
This is an excellent question, thank you Greg. It serves as a reminder that "thou shalt not omit the size when declaring a string based variable" as it can serve...
July 19, 2010 at 9:56 am
This is a very good question, thank you.
I believe that BOL page clearly states that "0 cannot be used", it just does not state it in these words. Here is...
July 15, 2010 at 9:24 am
Viewing 15 posts - 46 through 60 (of 203 total)