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!

Not able to set page item using PL/SQL Function Body

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.

This post has been answered by LucasH.- on Dec 6 2023
Jump to Answer
Comments
Post Details
Added on Dec 6 2023
4 comments
899 views