SET DATEFIRST option

  • Hi,

    We are migrating our SQL 2000 database to SQL 2005 and we got to know that there is some behavioural difference of SET DATEFIRST option between SQL 2000 and SQL 2005.

    Can anybody help us in this regard?

    Thanks

    Vishal

  • Could you describe the behavioral difference you are experiencing?

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Actually in lots of Stored Procedure we have used SET DATEFIRST option and then DATENAME function so before migrating our server from 2000 to 2005 we just wanted to confirm that if DATEFIRST affects DATENAME function value or any other Date functions value.

    We didn't find any difference we just got to know, you can say some unknown sources but wanted to make sure.

  • it will work when u migrate from 2000 to 2005 as the similiar funtionality being carried by sqlserver

  • On possible breaking behavioral difference in SQL Server 2005 that concerns datetime functions is that converting character strings to datetime implicitly is now considered to be non-deterministic. This is more of an issue for user defined functions though. Can hit you if you use indexed views.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • C'mon folks... What makes you think that SET DATEFIRST is going to change the NAME of the day... TUESDAY is TUESDAY no matter what SET DATEFIRST is set to.

    I'm a bit surprised that you haven't run a simple test... takes less time and thought to do it that the 2 post you made asking strangers for an opinion. 😀

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

  • Jeff,

    LOL 😀

    DateFirst doesn't affect DateName value but in case if it does to anyother Date function 🙂

  • Heh... sure... it'll affect the "dw" option of the other (not DATENAME) functions... nothing else... even if they were to break it in 2k5 🙂 Pretty sure they didn't, but could be wrong 😀

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

Viewing 8 posts - 1 through 7 (of 7 total)

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