I wanted to set a page item (named P1_COUNT) by writing a query in pl/sql. The source type I used is Function body. In series we get an option to use Function returning sql query which is not present here. I have a lot of conditionals that get used to calculate the value in the page item and it is only possible by using pl/sql (unless you can recommend something else). You can consider that the query is somewhat written in this format -
declare
q long;
begin
q := 'select count(*), e_id from some_table group by e_id';
return q;
end;
This is displaying the query which I understand would be because the query did not execute and the string is being returned. Is there a way that the query gets executed?
Thanks.