Is that possible to pass the variable path on JSON_QUERY? I've tried this
select
t1.ID,
JSON_QUERY(PRC_DATA, t2.key WITH WRAPPER)
from
TEST_JSON T1,
TEMPLATES T2
But it returns the following error
ORA-40454: path expression not a literal
40454. 00000 - "path expression not a literal"
*Cause: The provided path expression was not a literal (a constant).
*Action: Provide a constant path expression.
Error at Line: 9 Column: 35
I don't want to use Execute Immediate, because I want to INSERT-SELECT this JSON keys into a table.