• You can use '&' for decoding @@OPTIONS

    PRINT @@OPTIONS

    IF ( (8 & @@OPTIONS) = 8 ) PRINT 'ANSI_WARNINGS'

    IF ( (16 & @@OPTIONS) = 16 ) PRINT 'ANSI_PADDING'

    IF ( (32 & @@OPTIONS) = 32 ) PRINT 'ANSI_NULLS'

    IF ( (64 & @@OPTIONS) = 64 ) PRINT 'ARITHABORT'

    IF ( (256 & @@OPTIONS) = 256 ) PRINT 'QUOTED_IDENTIFIER'

    IF ( (512 & @@OPTIONS) = 512 ) PRINT 'NOCOUNT'

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537