Decoding the Code

  • Comments posted to this topic are about the item Decoding the Code

  • This was removed by the editor as SPAM

  • Great "Decoder" post.  Thanks for taking the time to put it together, Steve.  You're the best!

    Joining in the "Decoder" fun, decode this. 😀  Folks like Lynn Pettis will have no problem.

    https://qa.sqlservercentral.com/blogs/some-common-date-routines

    Same possible answers the you posted in your question...

     SELECT [Whatzit???] = DATEADD(dd,DATEDIFF(dd,-53690,DATEFROMPARTS(DATEPART(yy,GETDATE()),5,31))/7*7,-53690);

    For those that want a bit more fun, if you know me, you already know the answer.

     SELECT [Whatzit???] = DATEADD(dd,DATEDIFF(dd,-53690,DATEFROMPARTS(1900+t.N,5,31))/7*7,-53690)
    FROM dbo.fnTally(0,200)t
    ;

    Remembering the day...

    Thank you to all my comrades in arms,  whether you served, are currently serving,  and especially to those that made the ultimate sacrifice.  Thank you to all the loved ones that miss those serving and all those that can only remember now that they're gone.  My thoughts are with you and them today and most every day.

    And a special call out to Lynn Pettis... he was writing SQL while he served in harms way.  IIRC, he was a civilian employee at the time but he was still "over der" helping out.

    Jeff Moden STS1(SS)

    U.S.N 17 Sep 71 - 06 Mar 80

    --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 3 posts - 1 through 2 (of 2 total)

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