Relative Content

Tag Archive for sqljsonoracle

Generate Nested JSON payload using JSON function Oracle 19c

Hi I created a query to generate JSON but I am getting ORA-00935: group function is nested too deeply. I am using Oracle 19c.
Below is the query I wrote but my grouping is somehow repeating.When I use JSON_ARRAYAGG or JSON_OBJECTAGG it gives the above error.I am missing something .Do I have to call the table again?

Translate JSON data into ORACLE sql table

“` select JT.* FROM JSON_TABLE (json_sample) ‘$.general[*]’ COLUMNS ( product_key NUMBER PATH ‘$.product_key’, group_subtype_id NUMBER PATH ‘$.group_subtype_id’, group_subtype_name VARCHAR2 ( 100 ) PATH ‘$.group_subtype_name’, variant_id NUMBER PATH ‘$.variant_id’, variant_name VARCHAR2 ( 100 ) PATH ‘$.variant_name’, rb_customer_id NUMBER PATH ‘$.rb_customer_id’, NESTED PATH ‘$.partnumbers[*]’ COLUMNS ( partnumber VARCHAR2 ( 100 ) PATH ‘$.partnumber’, pn_type VARCHAR2 ( 100 […]