Subject | Re: Problem with FIRST in where clause |
---|---|
Author | Adam |
Post date | 2006-08-31T11:31:10Z |
--- In firebird-support@yahoogroups.com, "Christian Kaufmann"
<ch.kaufmann@...> wrote:
You may be able to get what you want using a selectable stored procedure.
Adam
<ch.kaufmann@...> wrote:
>First n doesn't work properly in a subquery.
> The following query should find the last 50 meets, that where recently
> changed and should sort the result by the date of the meet:
>
> select * from MEET
> where MEETID in (select first 50 MEETID from MEET order by LASTCHANGED
> desc)
> order by ENDDATE
>
> When I run this query, I get all records of my table MEET. Can
> somebody tell me, what goes wrong?
>
You may be able to get what you want using a selectable stored procedure.
Adam