Subject Re: Problem with FIRST x SKIP y
Author salisburyproject
Hi,

did what you suggested:
- Removed DISTINCT
- Used column names, instead *.

No result, same behavior.

It looks like the join is the cause of the problem.

Tried both with WHERE and JOIN - same.


--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@k...>
wrote:
> 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