Stairway to Advanced T-SQL Level 9: Compare, Modify, Derive and Validate Date and Time Values

  • Jack 49290 - Thursday, March 30, 2017 3:45 PM

    Can you please elaborate onQ1?  Based on the chart at the top, the shortest a DATETIMEOFFSET can be is 8 and the longest aDATETIME2 can be is 8 so “AT BEST†they are equal.

    Apparently, this author doesn't respond to questions about his articles.

    DATETIME2(3) and DATETIME2(4) both only take 7 bytes.  DATETIME takes 8 bytes.  DATETIMEOFFSET(3) and DATETIMEOFFSET(4) both take 9 bytes.  Answer "B" is NOT the correct answer to the question.  Answer "C" is the correct answer.

    --Jeff Moden

    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing post 16 (of 16 total)

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