declare @t table(isalive bit) insert @t values(0) insert ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

declare @t table(isalive bit)
insert @t values(0)
insert @t values(1)
insert @t values(0)
insert @t values(null)


declare @isalive int
set @isalive = -1



SELECT * FROM @t
WHERE coalesce((1 ^ coalesce(isalive, 0)) ^ @isalive * @isalive, 1) > 0

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results