Forum Replies Created

Viewing 15 posts - 46 through 60 (of 203 total)

  • RE: What will happen?

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

  • RE: HAVING without GROUP BY

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

  • RE: SET ROWCOUNT and table variable

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

  • RE: DATALENGTH

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

  • RE: TempDB

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

  • RE: SQL 6.5 and Y2K

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

  • RE: Data Type and Length

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

  • RE: Deprecated Features

    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

  • RE: Transaction rowcount

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

  • RE: Round up or down I

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

  • RE: Round up or down I

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

  • RE: Round up or down I

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

  • RE: Transaction rowcount

    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

  • RE: VARCHAR datatype

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

  • RE: Predict the outcome

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

Viewing 15 posts - 46 through 60 (of 203 total)