Subject | Re: problem using SELECT FIRST N in SP |
---|---|
Author | constantijnw |
Post date | 2005-08-01T00:40:48Z |
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
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