• Patibandla (7/2/2013)


    What if i define @s-2 as BIGINT

    Can you give me a real time scenario as in this operator would be useful. i am just a bit curious as i have never used used it.

    If you check out the Books Online entry for the sysschedules table (2012),

    http://msdn.microsoft.com/en-us/library/ms178644.aspx

    you’ll notice the following statement:

    freq_interval is one or more of the following:

    1 = Sunday

    2 = Monday

    4 = Tuesday

    8 = Wednesday

    16 = Thursday

    32 = Friday

    64 = Saturday

    It means that if my job is to run on Tuesday and Saturday, the value will be 68. On Tuesday you would test it with a mask 4, on Saturday with 64. Test on say Wednesday (mask 8) will result in zero, meaning "don't run."