vazymimil - 2015-06-26

when executing values(case 0 when :parm then 1 else 0 end)

if value entered is digits only result is
An unexpected token "when1" was found following "values(case 0 ". Expected tokens may include: "WHEN".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.12.55 SQL Code: -104, SQL State: 42601

Same with two spaces works OK
values(case 0 when  :parm then 1 else 0 end)

Equivalent with string values works OK
values(case 'a' when :parm then 1 else 0 end)