• Source is the name of a TinyInt column in the table.

    Source&4<>0 is a method of determining a binary bit's value, in this case the 3rd bit from the right.

    Source&4 is a boolean AND operaration using 4 as the mask, so if:

    Source = 00000111 (decimal 7)

    opcode = &

    (mask) = 00000100 (decimal 4)

    --------------------------------

    yields 00000100

    which is not equal to zero therefore the CASE statement would return 1.



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.