Forum Replies Created

Viewing 15 posts - 121 through 135 (of 286 total)

  • RE: Certifications.

    I like doing certifications, because it forces me to study things that I may not encounter in my day-to-day work. I agree that there are plenty of other ways of...

  • RE: Changing collations

    Thanks for the kind comments everyone.

    This question was written after I'd spent a day or so changing the collation on a database and found that before I could even change...

  • RE: Data conversion

    rmechaber (3/22/2011)


    dave.farmer (3/22/2011)


    rmechaber (3/22/2011)


    A fascinating and scary exploration of how SQL Server doesn't always follow ANSI syntax for dates:

    http://www.karaszi.com/SQLServer/info_datetime.asp.

    Thanks for that - excellent article.

    When trying some of the examples in...

  • RE: Scaled-down SQL

    Toreador (3/22/2011)


    Duncan Pryde (3/22/2011)

    That's kind of the "moral" of the question. Never use a "bigger" decimal/numeric than you actually need.

    The moral I've drawn is that maybe Floats aren't as bad...

  • RE: T-SQL

    Thanks for the question - clearly highlights the pitfalls in implicit conversions.

  • RE: Scaled-down SQL

    rlswisher (3/22/2011)


    Declare @value1 numeric(38,10)

    Declare @value2 numeric(1,1)

    SET @value1 = 1234567890.123456789

    SET @value2 = 0.1

    SELECT @value1

    SELECT @value2

    SELECT @value1 * @value2

    = "123456789.012345679"

    As expected.

    Result precision is 38+1+1 = 40, scale is 10+1 = 11....

  • RE: Scaled-down SQL

    pksutha (3/22/2011)


    My answer is like this

    first part which is i 've answered:

    Declare @value1 decimal(20,10),@value2 decimal(20,3)

    SET @value1 = 1234567890.123456789

    SET @value2 = 0.1

    SELECT @value1 * @value2

    Second part is screened answer:

    DECLARE...

  • RE: Data conversion

    Toreador (3/21/2011)


    Duncan Pryde (3/19/2011)


    Given that it causes so much heartache, does anyone know why SQL Server allows implicit string-to-date conversion for anything other than ANSI or ISO format dates? Surely...

  • RE: Scaled-down SQL

    michael.kaufmann (3/21/2011)


    tilew-948340 (3/20/2011)


    I am sorry, but I realy, realy don't understand why D is not good, even if I do your formula.

    Why is so that D would have a...

  • RE: Scaled-down SQL

    Hugo Kornelis (3/21/2011)


    Good question; superb explanation!

    I guess that if the author had included "all of the above" as a fifth answer option, the rate of incorrect answers would have been...

  • RE: Scaled-down SQL

    bitbucket-25253 (3/20/2011)


    Excellent question and a more than excellent explanation of why the correct answer is what it is.

    Thanks - high praise indeed! I must mention though, that when trying to...

  • RE: Data conversion

    Tom.Thomson (3/19/2011)


    The question of date formats has come up a pretty large number of times in QoTD discussions in the last two or three years, and it amazes me that...

  • RE: Data conversion

    I was going to get it right, but then saw the '2/13' date and dithered, knowing that the insert would fail on my British system, and then guessed that the...

  • RE: Create stored procedure

    Here's where it's useful. If you want an alternative to the DROP and CREATE method of maintaining stored procedure scripts - which would overwrite metadata about when a procedure was...

  • RE: SQL Script to check SQL Server cluster Nodes.

    michael.kaufmann (3/15/2011)


    Totally agree!

    Only want to add the link to the page again: http://msdn.microsoft.com/en-us/library/ms176098.aspx

    Despite the versions listed (from 2005 through 2011), the correct answer is based on an older version (SQL...

Viewing 15 posts - 121 through 135 (of 286 total)