I encountered error
ORA-06502: PL/SQL: numeric or value error at FETCH INTO (last line at below FUNCTION ).
I understand that this error may happen due to type mismatch of data in the cursor and its row type.
But if you see the screenshot (definition of HQP_IF_DATA_CONV_EXTRACT and 1 record that is going to be inserted), everything looks ok.
All are STRING type data and there is no limit exceeded.
Is there any better idea, otherwise how to troubleshoot further?
FUNCTION INSERT_INTO_BU_STAGING(p_sql IN VARCHAR2) RETURN VARCHAR2 IS TYPE refCursor IS REF CURSOR; -- define weak REF CURSOR type a_cursor refCursor; rec HPQ_IF_DATA_CONV_EXTRACT_BU%ROWTYPE; j NUMBER; BEGIN j := 0; OPEN a_cursor FOR p_sql; LOOP FETCH a_cursor INTO rec; 
p_sql...