Skip to Main Content

SQL & PL/SQL

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!

Pipelined function in an anonymous block

687179Feb 24 2009 — edited Mar 19 2009
When I run the anonymous block blow, I get error "PLS-00231: function 'BOB' may not be used in SQL"
How can I fix it? Thanks in advance.

declare
cnt number;
type number_type is table of number;

function bob return number_type
pipelined
as
begin
for i in 1..10
loop
pipe row(i);
end loop;
end bob;

begin
select count(*) into cnt from table(bob);
end;
/
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2009
Added on Feb 24 2009
7 comments
1,913 views