Skip to Main Content

APEX

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!

Function returning multiple values

partlycloudyApr 2 2019 — edited Apr 3 2019

Oracle 12.1

Probably a question for the SQL forum...

Oracle functions cannot return multiple values so I used a function returning APEX_T_VARCHAR2 with the following signature. The function returns exactly 4 rows with various details based on the ID passed in. In other words,

select * from table(get_details(1234))

returns 4 rows.

    FUNCTION get_details(

        p_id IN INTEGER

    )

    RETURN apex_t_varchar2;

How can I integrate this function into a SQL query (ID is one of the columns in the query) to get the 4 rows returned by the function as 4 columns in the query?

Any ideas appreciated. Thanks.

Comments
Post Details
Added on Apr 2 2019
7 comments
2,920 views