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!

18.2 chart PL/SQL Function Body with variable table name

RoadlingNov 1 2018 — edited Nov 2 2018

I have a legacy 4.2 application we are upgrading and it has a chart with a region that is a PL/SQL Function Body returning SQL Query where the parsing schema is set as a page item.

This works fine in 4.2 as an Anychart sequence but in 18.2 making a chart with the same query just throws an error and will not save and I cannot find any obvious way to parse at runtime. It is obvious with the new Jet Chart implementation it needs to parse to get the column names to set the series attributes but I was hoping someone might have worked around this issue already.

declare

v_schema varchar2(20);

l_sql varchar2(2000);

begin

--v_schema := 'SYS';

v_schema := :P15_SCHEMA;

l_sql := 'select t.owner as label, count(*) as value'||chr(10)||

     'from '||v\_schema||'.all\_tables t'||chr(10)||

     'where rownum \< 100'||chr(10)||

     'group by t.owner;';

return(l_sql);

end;

pastedImage_9.png

throws an error and cannot be saved

pastedImage_6.png

This post has been answered by fac586 on Nov 1 2018
Jump to Answer
Comments
Post Details
Added on Nov 1 2018
5 comments
263 views