Skip to content
Advertisement

Getting Error “PLS-00201: identifier ‘JSON_VALUE’ must be declared” in PL/SQL

I am trying to extract data from Json file stored in a table. But I am not able to execute the package JSON_VALUE inside PL/SQL.

Below query works fine:

But Below PL/SQL block doesn’t work:

It gives PLS-00201: identifier ‘JSON_VALUE’ must be declared Error.

Advertisement

Answer

Try this

It is working for me.

For DB version 12.1, PL/SQL assignment SQL_QUERY_RES := JSON_VALUE('{a:100}', '$.a' ); doesn’t work, you need to use within a select statement, but for 12.2 works.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement