Subject Re: FIRST with input parameter
Author rebel_rob_98
Like Ivan stated below, plus you can use a variable for the skip
command (used in conjuction with the first):

FOR SELECT FIRST(:numbertoreturn) SKIP(:m)...
...
DO

Robert


--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
> SELECT FIRST (:numberofarticles) ...
>
> Ivan
>
>
> ----- Original Message -----
> From: "Roger Pullen" <rpullen@n...>
> To: <firebird-support@yahoogroups.com>
> Sent: Wednesday, June 29, 2005 4:21 PM
> Subject: [firebird-support] FIRST with input parameter
>
>
> > All
> >
> > I have written a stored procedure that selects the first 3 items,
what I am
> > trying to do now is allow the stored procedure to take an input of the
> > number of rows to select and use this to pull of x records.
> >
> >
> > Current sql:
> > SELECT FIRST 3
> >
> >
> > It doesn't like it if I try to put a parameter in place of the 3
> > SELECT FIRST :numberofarticles
> >
> >
> > Regards
> >
> > Roger