I'm trying to get Db2's JSON_VALUE
ERROR ON EMPTY
clause to work:
select json_value(json_object(key 'a' value 1), '$.b' error on empty)
from SYSIBM.DUAL
The above doesn't seem to behave as expected. I'm getting a null result:
1|
-|
|
In Oracle, this works as expected:
select json_value(json_object(key 'a' value 1), '$.b' error on empty)
from DUAL
... producing
ORA-40462: JSON_VALUE evaluated to no value
What am I missing? I'm using Db2 LUW (DB2 v11.5.0.0).