Deterministic

  • Revenant

    SSC-Forever

    Points: 42467

    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!

  • TomThomson

    SSC Guru

    Points: 104762

    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

  • SQLRNNR

    SSC Guru

    Points: 281210

    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

  • Ron McCullough

    SSC Guru

    Points: 63877

    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]

  • Olga B

    Default port

    Points: 1479

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

  • PChiragS

    SSCarpal Tunnel

    Points: 4965

    +1

    great question..

  • mtassin

    SSC-Insane

    Points: 23035

    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]

  • db4breakfast

    Ten Centuries

    Points: 1097

    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.

  • David Conn

    SSCertifiable

    Points: 5506

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

  • sqlnaive

    SSCoach

    Points: 17435

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

  • Arno Kwetters

    Hall of Fame

    Points: 3335

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

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

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