I'm trying to index a particular value from stored DB2 nosql, for that I'm using json_val but I need to invoke UDF SYSTOOLS.BSON2JSON to the json_val
and need to point the table from where I required data.
SELECT SYSTOOLS.BSON2JSON(CUSTOMERDATA)
FROM JSONPO
WHERE YEAR(JSON_VAL(CUSTOMERDATA,'PO.@orderDate', 'd')) = 2017;
The above query resulting in sql error -440 so I need to invoke the json_val. How would I invoke it? How would I write stored procedure for it?
BSON2JSON
andJSON_VAL
), but without a full error message we can't guess which one is the problem.CUSTOMERDATA
? could you show the DDL ofJSONPO?