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 used for IN clause

shiva887Dec 16 2019 — edited Dec 16 2019

DB Version: Oracle Database 12c Enterprise Edition Release 12.2 - 64bit Production

Can someonce let me know if the JSON_TABLE can be used as below. I get a weird internal error.

UPDATE UNF_WEB_TEAM_MEMBER X

SET (X.DFG_ID) = ( SELECT DISTINCT RA.DFG

                                FROM         MS\_REP\_ADDR RA

                                WHERE        RA.ZIP IN (SELECT jt.zip FROM json\_table(x.DATA.AddressList, '$\[\*\]' COLUMNS (zip VARCHAR2(5) PATH '$.Zip')) jt)

    );

My table unf_web_team_member has a data column which has JSON saved in it. The AddressList element in JSON has multiple addresses of which i am trying to match zip codes. Below is the error i get when executing the query.error.png

Comments
Post Details
Added on Dec 16 2019
1 comment
351 views