Useful expressions

If you are a C# developer, the expressions below will seem obvious. If you have a SQL background or come from another language, please read this section. It will save you a lot of time later.

if null, pick a default value, otherwise use the value

stringcol1 ?? "defval"

The ?? is the C# null coalescing operator.

if an expression is true, pick one value, otherwise pick a different one

<expr> ? "was_true" : "was_false"

if an expression is true, pick one value, otherwise pick a different one

<expr> ? "was_true" : "was_false"

Test if null

<expr> == null : "was_false"

results matching ""

    No results matching ""