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!

How can a function returning character length greater than 4000 be selected in SQL

RijuNov 13 2013 — edited Nov 13 2013

Hi,

I want to know if there is a way to write a select query on a function call which returns a varchar of more than 4000 characters.

CREATE OR REPLACE FUNCTION FUNC1

RETURN VARCHAR2

IS

str VARCHAR2(32767);

BEGIN

     str := <some string greater than 4000 char>;

      RETURN str;

END;

/

SELECT FUNC1 from dual; ---- This gives an PL/SQL numeric or value error. Character string buffer too small.

Is there any way to resolve this?

Thanks

This post has been answered by Frank Kulash on Nov 13 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2013
Added on Nov 13 2013
4 comments
7,945 views