Subject 1500 values in IN (...) clause fails
Author Kjell Rilbe

I just bumped up ECO to select up to 1500 objects from persistence in
one go, resulting in a select like this:

SELECT "Uppgift_A"."ECO_ID",
FROM "Uppgift" "Uppgift_A"
WHERE "Uppgift_A"."Hållare" IN (601089, 601092, ...)

I checked that it put exactly 1500 values in there, but FB fails:

Message: isc_dsql_prepare failed

SQL Message : -901
Unsuccessful execution caused by system error that does not preclude
successful execution of subsequent statements

Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -901
Implementation limit exceeded
Too many values (more than 1500) in member list to match against

So, either I've been misinformed or there's a bug in FB. Either FB
should support 1500 and has a bug, limiting it to 1499. Or FB is
supposed to support up to BUT NOT INCLUDING 1500 values, in which case
every place I've seen this limit mentioned has been incorrect.

So, which is it?

Not that it matters very much, it just nags me that it seems wrong.

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

[Non-text portions of this message have been removed]