Subject | Re: [ib-support] Stored procedure retun |
---|---|
Author | Andrew Guts |
Post date | 2003-02-10T14:29:08Z |
Michael Vilhelmsen wrote:
create procedure spResultSet(K char(50))
returns (NN integer, F1 integer, F2 char(50)) as
begin
NN = 1;
for select first 20 Field1, Field2 from MyTable
where Field2 like :K into :F1, :F2
do begin
suspend;
NN = NN+1;
end
end^
set term ; ^
>Hiset term ^ ;
>
>Is it posible to have a stored procedure return a dataset ?
>
>A simpel ex. could be Select * from MyTable
>
>which should return 20 records.
>
>Michael
>
>
>
create procedure spResultSet(K char(50))
returns (NN integer, F1 integer, F2 char(50)) as
begin
NN = 1;
for select first 20 Field1, Field2 from MyTable
where Field2 like :K into :F1, :F2
do begin
suspend;
NN = NN+1;
end
end^
set term ; ^