Subject Re: [firebird-support] Re: Problem with FIRST x SKIP y
Author Milan Babuskov
salisburyproject wrote:
> select first 30 skip 100 distinct messages.*, msg_to.to_email,
> msg_to.to_name, msg_to.to_type
> from messages inner join msg_to on (messages.common_id =
> msg_to.common_id) order by messages.msg_key asc, msg_to.to_type desc
>
> The problem is still here - only 7 rows returned...

I could bet that the problem is in "distinct"

Things to try:

- replace messages.* with column list
- remove distinct (pk of "messages" is unique, you don't need it anyway).

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org