The expressions are equivalent (the arrow describes the preferred direction):
CASE
WHEN t1 THEN r1
ELSE CASE
WHEN t2 THEN r2
ELSE r3
END
END
→
CASE
WHEN t1 THEN r1
WHEN t2 THEN r2
ELSE r3
END
To keep the following expressions simpler, they are given using ternary notation, i.e. t1 ? r1 : r2 instead of CASE WHEN t1 THEN r1 ELSE r2 END.
[ ] t ? x : x → x
[x] (t ? true : false/null) ? r1 : r2) → t ? r1 : r2 dotnet#34175
[x] (t ? false/null : true) ? r1 : r2) → !t ? r1 : r2 dotnet#34175
[ ] t ? true : false → t == true
[ ] t ? false : true → !boolExpr
[ ] !boolExpr ? x : y → boolExpr ? y : x
[ ] !(t ? x : y) → t ? !x : !y
WIP
The expressions are equivalent (the arrow describes the preferred direction):
→
To keep the following expressions simpler, they are given using ternary notation, i.e.
t1 ? r1 : r2instead ofCASE WHEN t1 THEN r1 ELSE r2 END.[ ]
t ? x : x→x[x]
(t ? true : false/null) ? r1 : r2)→t ? r1 : r2dotnet#34175[x]
(t ? false/null : true) ? r1 : r2)→!t ? r1 : r2dotnet#34175[ ]
t ? true : false→t == true[ ]
t ? false : true→!boolExpr[ ]
!boolExpr ? x : y→boolExpr ? y : x[ ]
!(t ? x : y)→t ? !x : !yWIP