Subject Re: [firebird-support] How to handle a large 'IN' clause?
Author Kjell Rilbe
phil_hhn wrote:

> The problem arises when the list is something like 10,000 records
> long. If the user goes to the middle of the table and selects half of
> them and calls either 'omit' or 'show' those rows, we run a query
> which has a huge 'in' clause. We get the error:
>
> SQL error code -901
> Implementation limit exceeded
> too many values (more than 1500) in member list to match against
>
> So how should we go about handling this? One solution may be to block
> the users in the interface...

Store the list in a temporary table and refer to that table in your
select, either by using an in clause or an inner join. Not sure which
would be more efficient.

Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64