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!

Cannot create json_value index on array

taohikoDec 7 2017 — edited Dec 7 2017

I have a sample table as below

GROUP_IDMEMBER ( Data type is CLOB and constraint check is JSON)
1['Jone','Garry']
2['Nick','Bill']
3['Bill','Garry']
4['Nick','Lisa']

It has been transformed from JSON format and I need to create index on MEMBER column to run following SQL

select group_id,member

from group_list gl,

json_table(t.member,'$[*]' columns (member_list path '$')) ga

where ga.member_list like '%Nick%';

Currently, the explain plan is a full-scan table, I'm trying to avoid by creating index on "MEMBER" column by using json_value but I got error message

ORA-40470: JSON_VALUE evaluated to multiple values 

How do I create an index on the "MEMBER" column?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2018
Added on Dec 7 2017
6 comments
721 views