← nvl operator page · conditional/nvl/sc_sc/null_first_operand

Null first operand 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

nvl ( null, SC_1 ) with SC_1 = 0: a null first operand on scalars.

Manual:

Nvl: "nvl ( null, 0 ) returns 0".

Expected:

SC_r = 0, an Integer: op1 is null, so the result is op2.

script.vtl ⇩

SC_r := nvl ( null, SC_1 );

input/scalars.csv ⇩

SC_1
0

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Integer"}
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_r", "type": "Integer", "value": "0"}
  ]
}