json - ORA-06502: PL/SQL: numeric or value error: character string buffer too small - Convert Clob to varchar2 -
im getting error while trying convert clob varchar2 using api.
the 'body' field im trying retrieve clob, want convert varchar2(1000).
please advice why error occurred :
merge xxx d using ( select v_ticket_id ticket_id, json_ext.get_number(json(value(s)),'id') comment_id, json_ext.get_number(json(value(s)),'author_id') author_id , dbms_lob.substr(json_ext.get_string(json(value(s)),'body'),1000,1) body, json_ext.get_string(json(value(s)),'via.channel')channel, case when lower(json(value(s)).get('public').to_char()) = 'true' 1 else 0 end is_public, to_date(replace(replace(json_ext.get_string(json(value(s)),'created_at'),'t',' '),'z',null), 'yyyy-mm-dd hh24:mi:ss') created_at, sysdate table(pkg.sf_retreive_data('retreive').list_data) s) s on (d.ticket_id = s.ticket_id , d.comment_id = s.comment_id) when matched update set author_id = s.author_id, body = s.body, channel = s.channel, is_public = s.is_public, created_at = s.created_at, bi_updated_time = sysdate when not matched insert (ticket_id,comment_id,author_id ,body,channel,is_public,created_at,bi_updated_time) values (s.ticket_id,s.comment_id,s.author_id,s.body,s.channel,s.is_public,s.created_at,sysdate); commit;
and error : error: ora-06502: pl/sql: numeric or value error: character string buffer small
Comments
Post a Comment