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!

Pass value in PL/SQL function body return sql query.

Ali AsgorDec 23 2015 — edited Dec 26 2015

I create a classic report that query type "PL/SQL function body return sql query" in APEX. Now i want to pass item value to PL/SQL function body. My item contain list of table name. When i select a table name report must show data from the selected table. example-

DECLARE

     l_query VARCHAR2(400);

BEGIN

     l_query := 'SELECT * FROM '||:P_ITEM_NAME;

  RETURN l_query;

END;

but when i create this type report got this error "ORA-00903: invalid table name". 

Actually i don't know, is it possible to create this type of report. or any idea how to create this type of report.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2016
Added on Dec 23 2015
11 comments
16,313 views