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.