SQL Language (MOSC)

MOSC Banner

Could not get expected output using JSON_TABLE

edited Jun 5, 2020 5:41AM in SQL Language (MOSC) 3 commentsAnswered ✓

I have a following json expression which is a response of an HTTPS call:

[{"result":{"Response":{"id":"132844","execStatus":"200","execDescription":"SUCCESS"}}}]

I want to extract value of id element which is 132844.

I used following query but did not get expected output.

(select id

from json_table('[{"result":{"Response":{"id":"132844","execStatus":"200","execDescription":"SUCCESS"}}}]', '$[*]'

                 columns id       varchar2(500) path '$."id"'));

I am using DB version 12.1.0.2.0

I also checked below document:

https://docs.oracle.com/database/121/SQLRF/functions091.htm#SQLRF56718

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center