• camaro305hp - Monday, November 20, 2017 3:57 PM

    rwest 44523 - Wednesday, July 19, 2017 8:04 AM

    The best of all worlds:

    use [msdb]

    Declare @weekDay Table
    (
      mask int
    , maskValue varchar(32)
    );
    ................................................................

    Thank you!  This is exactly what I've been looking for.  Extremely useful script.

    Since it doesn't tell you of any failures, cancellations, nor how many times something has executed in, say, the last 24 hours, what will you do with the information that it produces?

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