Hi Team,
Below code inside ORDS template to call one procedure named DISTINV.calc_distinv_rank using huge clob data as input works fine without HTP.P(DOC1) but since we want to print output we use it. For less number of records ,everything works fine. But when record size grows, it throws error-REST Data Services
555 User Defined Resource Error
2021-11-30T10:39:24.645289Z | itkNbD_ylF1ZI_OHddPrxg | ORDS-25001
The request could not be processed because an error occurred whilst attempting to evaluate the SQL statement associated with this resource. Please check the SQL statement is correctly formed and executes without error. SQL Error Code: 6502, Error Message: ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 6
Debug Trace
[TE] url-mapping start: 2021-11-30T10:39:24.645312Z duration: 0ms
[TE] dispatch start: 2021-11-30T10:39:24.660585Z duration: 327ms
---------------------------------------------------------------------
Code:
DECLARE
DOC1 CLOB ;
BEGIN
DISTINV.calc_distinv_rank( :body_text,DOC1);
OWA_UTIL.MIME_HEADER('application/json');
HTP.P(DOC1);
END;