, :
(Column = @Value or (Column is null and @Value is null))
This leads to truth when both values ββare equal. Ideally, we can reverse this statement to find the inequality, but the tri-core SQL logic violates this idea, sinceNOT(UNKNOWN) = UNKNOWN
--DO NOT USE, broken
NOT (Column = @Value or (Column is null and @Value is null))
Therefore, if we check only the value TRUEand deny it, we still get a readable operation.
CASE WHEN Column is null and @Value is null or Column = @Value THEN 1 ELSE 0 END = 0
Mitch source
share