PL/SQL (MOSC)

MOSC Banner

Stored procedure error ORA-06502: PL/SQL: numeric or value error: character string buffer too small

in PL/SQL (MOSC) 1 commentAnswered

I have a store procedure which uses DBMS_LOB.SUBSTR and returns more than 4000K.

CREATE OR REPLACE PROCEDURE TEST1 (v_lotNum in varchar, cur_data_out out sys_refcursor)
AS
BEGIN
open cur_data_out for
SELECT
CASE
WHEN l.c_material_info > 0THEN (SELECT DBMS_LOB.SUBSTR(note_contents,(LENGTH(note_contents)))FROM lims_notes WHERE note_id = l.c_material_info)
ELSE 'None'
END AS "Reminder"
FROM lot l
WHERE l.t_ph_interface_login = 'T'
AND l.inspection_lot_num = v_lotNum;
END TEST;

==========================================

When executing is getting the error :

SQL> var mycursor refcursor;
SQL> begin

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center