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!

return multiple rows from a function

Sreenivas NJul 29 2014 — edited Jul 30 2014

Hi Gurus,

I have to create a function which take list of values(ex: 234,235,245,123) as input returns multiple row output.

create or replace

FUNCTION concatenate_list (p_in VARCHAR2)

  RETURN  VARCHAR2

IS

  l_return  VARCHAR2(32767);

BEGIN

    SELECT ven_mod || ': '|| names into l_return from tobject where object_id in (p_in); 

  RETURN LTRIM(l_return);

END;

I have to show all of them in single row. when I use listagg function it says the limit exceeds 4000 chars (if the list of input parameter is huge) and I can't use wm_concat as it is not oracle documented.

can you please suggest how can I return all those values in single go.

thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2014
Added on Jul 29 2014
7 comments
8,246 views