Subject Re: problem using SELECT FIRST N in SP
Author constantijnw
Hi Alan,

Is this what you need:


CREATE PROCEDURE GET_top_ten_3
RETURNS
(
nox1 numeric (9,2)
)
AS
declare variable low_high integer;
begin
low_high=0;
for select
nox
from releases
order by nox desc
into :nox1
do
begin
suspend;
if (low_high = 9) then
exit;
else
low_high=low_high+1;
end
end