Hello Omkar here,
I want to do 1 simple type of development in Oracle APEX such as, I am having a select list in the top and will be having report on the down side, the select list will show the list of some table names. On the click of that, my report should show the selected table's data. In the report i am using ‘PL/SQL function body returning SQL Query’ as the source of the report. In my package, i have a function, which will return the query to show the data for the selected table. Like example, for selected value as ‘EMP’ it returns ‘select * from EMP’
But in the source of interactive report, i did something like this:
declare
v_result varchar2(4000);
begin
v_result := EBA_DEMO_CARD_PKG.show_data(:P50_TNAME);
return v_result;
end
Here, ofc you will get to know what is package name, function name, page item name and returning variable. So i externally also cross checked by executing the function body, and it does return query value like ‘select * from EMP’ , so as per APEX its getting a PL/SQL Function body returning SQL Query, but still its not accepting this. It still says ‘ORA-20001: Query must begin with SELECT or WITH’ . I am not getting what to do, or do we have any other alternative solution which will let me select the table name from the select list and then the report will show the corresponding table's data?
Please help me out with this issue, its really urgent.
#oracleapex