Pipelined function in an anonymous block
687179Feb 24 2009 — edited Mar 19 2009When 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;
/