Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with returning clob from cursor .. or is HTP.P the problem ?

550289Jul 23 2007 — edited Jul 24 2007
Hi all,

I am returning a large amount of data from a table column (datatype clob) in APEX. If I return using a sql statement (as an APEX report) then it displays fine. When using a cursor however I receive "ORA-06502: PL/SQL: numeric or value error".

The sql statment (which works fine) is:

Select cb_text from cb_follow_up;

The cursor code (not working):

DECLARE

cursor cur_follow_up is SELECT CB_TEXT
FROM CB_FOLLOW_UP;

typ_follow_up cur_follow_up%ROWTYPE;

BEGIN

HTP.P('<TABLE>');

OPEN cur_follow_up;
FETCH cur_follow_up into typ_follow_up;
WHILE cur_follow_up%FOUND
LOOP
HTP.P('<TR><TD>'||typ_follow_up.cb_text||'</TD></TR>');
END LOOP;
CLOSE cur_follow_up;

HTP.P('</TABLE>');

END;

Any help is much appreciated !

Greg

Message was edited by:
greg cox
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2007
Added on Jul 23 2007
4 comments
679 views