Re: multiset and procedure
Posted in 2005
M.Kovacic wrote:
> Hi all,
>
> have a question; what I'm doing wrong or is this not possible; (ids 9.4)
>
> create procedure RetArr() returning integer as id;> return 1 with resume;
> return 2 with resume;
> return 3 with resume;
> end procedure ;
>
> select * from table(multiset (execute procedure RetArr() ))> -> this statement causes error, is this casting invalid is any way to use
> "multirows" procedure in SELECT statemant??
Well, it causes a syntax error.
Why not have the procedure return a multiset?
ie,
create procedure RetArr()
returns multiset(integer not null)
define retval multiset(integer not null);
insert into table(retval) values(1);
insert into table(retval) values(2);
insert into table(retval) values(3);
return retval;
end procedure;
select *
from table(RetArr());
--
rh