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!

ORA-40474: invalid UTF-8 byte sequence in JSON data

VPrasadFeb 19 2019 — edited Feb 21 2019

Hi Team,

When i am trying to run the query, i am facing below error, Please advise to alternative..

Oracle 12c is the version

SELECT UNIQUE me.asset_id, replace(im_dba.listaggclob(cast(collect(JSON_OBJECT('formName' VALUE met.event_type_name,

    'startDate' VALUE  me.start_dt,

    'taskDesc' VALUE nvl(me.event_desc,'NA'),

    'taskId' VALUE me.event_id)) as im_dba.t_varchar2_tab)),' ',',') data

FROM ma_dba.ma_event me, ma_dba.ma_event_type met

WHERE me.event_type_id  =  met.event_type_id

--AND me.asset_id IN ( 2720074, 2720425,3764545)

AND EXISTS (SELECT 1 FROM IM_DBA.IM_EQUIPMENT_VW2 VW)

                    group by me.asset_id

                    having count(me.asset_id) > 0;

Errror:

ORA-40474: invalid UTF-8 byte sequence in JSON data

40474. 00000 -  "invalid UTF-8 byte sequence in JSON data"

*Cause:    The provided JavaScript Object Notation (JSON) data had an invalid

           UTF-8 byte sequence.

*Action:   Provide JSON data with corrected UTF-8 byte sequence or escape

           the characters.

Comments
Post Details
Added on Feb 19 2019
8 comments
4,102 views