Subject | Re: second most recent value |
---|---|
Author | csswa |
Post date | 2002-04-28T16:01:35Z |
--- In ib-support@y..., Duilio Foschi <dedalus@y...> wrote:
select first 1 skip 1 qty from Table1 order by d_mov desc
From manual, use of FIRST:
SELECT [FIRST (<integer expr m>)] [SKIP (<integer expr n>)]
Retrieves the first m rows of the selected output set. The optional
SKIP clause will cause the first n rows to be discarded and return an
output set of m rows starting at n + 1.
Regards,
Andrew Ferguson
-- As mentioned in Revelations.
> "select first 1 qty from Table1 order by d_mov desc"Answer:
>
> However, I want the _second_ most recent QTY value.
select first 1 skip 1 qty from Table1 order by d_mov desc
From manual, use of FIRST:
SELECT [FIRST (<integer expr m>)] [SKIP (<integer expr n>)]
Retrieves the first m rows of the selected output set. The optional
SKIP clause will cause the first n rows to be discarded and return an
output set of m rows starting at n + 1.
Regards,
Andrew Ferguson
-- As mentioned in Revelations.