Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

json_table oracle 19

veritasMay 11 2021

Hello everyone,
Recently one of our external data source has changed it's format and broke the way we were collecting data. Basically now it's a json with some objects but I just can't figure it out what's the right path expression in order to extract the data ! Here is the type of select that we use but with no results :

 with aa as (select q'( {"50011":{"id":"50013", "sid":"855137","groups":null,"has":false,"type":1}, "50012":{"id":"50014", "sid":"855137","groups":null,"has":false,"type":1}} )' as data from dual)
 SELECT jt.* FROM   aa,
      JSON_TABLE(data, '$[*]'
         COLUMNS (
                  id number(8) PATH '$.id')) jt ;

Any help is appreciated !

Comments
Post Details
Added on May 11 2021
10 comments
970 views