• Our current database represents data source as a TinyInt column containing bit values to indicate source type; 1=Source1, 2=Source2, 4=Source3, etc... where the decimal numbers 1, 2, & 4 represent binary bits 00000001, 00000010, 00000100, respectively.

    In order to process these values within then constraints of SQL (SQL not having an aggregate OR function) I break the TinyInt into 3 separate columns Source1, Source2 & Source3 (as seen in the code). The 3 case statements, you've identified, serve this purpose.



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