Deterministic

  • I agree that the question is murky due to the exceptions. It took me 25 minutes to figure this one out; it forced my to read BOL really carefully.

    Thanks, Joe!

  • Nice straightforward question and unambiguous answer options.

    But rather that that odd chunk of code with the odd choice of languages the explanation would have done better to say simply that conversion from any style with a 2 digit century depends on the cut-off year and hence is nondeterministic, and conversion to or from any style that includes a month name depends on the current language and hence is nondeterministic.

    Tom

  • thanks for the question

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Revenant (3/22/2013)


    I agree that the question is murky due to the exceptions. It took me 25 minutes to figure this one out; it forced my to read BOL really carefully.

    Thanks, Joe!

    +1

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Koen Verbeeck (3/22/2013)


    So a part of the correct answer is "all styles below 100" are non-deterministic, but another answer is "not 20,21", because they are deterministic...

    Well, the question was which styles are deterministic, so the answer was "Styles 20,21 and all styles above 100 are deterministic, except 106,107,109, and 113."

  • +1

    great question..

  • BLAH! This is not my Monday... I saw all the correct answers, and answered the question as if it were asking for the non-deterministic, not the deterministic ones...

    I don't think there's enough coffee in the world for me today.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • m mcdonald (3/22/2013)


    The way I read there are only 2 correct answers:

    not 106,107,109,113

    20,21

    The answer, and included as a correct answer

    Styles greater than 100

    Cannot be correct because of the exceptions 106,107,109,113.

    The answer appears to have been incorrectly parsed...

    From http://msdn.microsoft.com/en-us/library/ms178091.aspx

    Source or target type is datetime or smalldatetime, the other source or target type is a character string, and a nondeterministic style is specified. To be deterministic, the style parameter must be a constant. Additionally, styles less than or equal to 100 are nondeterministic, except for styles 20 and 21. Styles greater than 100 are deterministic, except for styles 106, 107, 109 and 113.

    </my 2 cents>

    I agree with you. Good question anyway. 🙂

    --------------------------------------------------------------------------------------
    Hai Ton
    My Db4Breakfast blog.

  • Interesting Question even though I don't see any reason to be using the Datatime Data Type this far into the 21st Century.

  • Interesting question. After around 45 mins of hardwork, i figured out wrong answers. Still need to understand the question and justify answers for my own knowledge. Good challenging one though. 🙂

  • Yeah, special numbers has a special meaning in terms of formatting

Viewing 11 posts - 16 through 25 (of 25 total)

You must be logged in to reply to this topic. Login to reply