Trying to perform one logical NOT operation, it looks like the following block does not work in MS SQL Server 2005
DECLARE @MyBoolean bit; SET @MyBoolean = 0; SET @MyBoolean = NOT @MyBoolean; SELECT @MyBoolean;
Instead, I become more successful with
DECLARE @MyBoolean bit; SET @MyBoolean = 0; SET @MyBoolean = 1 - @MyBoolean; SELECT @MyBoolean;
However, it looks a little distorted to express something as simple as negation.
Did I miss something?
sql sql-server tsql boolean-operations
Joannes Vermorel Oct 07 '08 at 9:35 2008-10-07 09:35
source share