Re: Too many items in IN clause? "erkki" <mail125@operamail.com> wrote in message
news:MMtWb.1099$CO2.87@read3.inet.fi...
> Hi,
>
> I have problem with db2 8.1.2. I guess that the origin of the problem
> could be my select clause because I use IN operand with huge amount of
> items like 'SELECT * FROM TABLE WHERE FIELD IN (1, 2, ...,400)'.
>
> The error that db2 gives randomly is
>
> [IBM][CLI Driver][DB2/NT] SQL0805N Hakusuunnitelmaobjektia
> "NULLID.SYSLH203 0X5359534C564C3031" ei ole löytynyt. SQLSTATE=51002
>
> That finnish part 'Hakusuunnitelma' means something like IndexObject and
> 'ei ole löytynyt' means not found.
>
> Is there some limit there how many items there can be used with IN
> operand? Or does anyone have any other ideas what should I do?
>
In the past there has been a limit, but I don't know what it is, or whether
it has been recently lifted. Probably the best choice is load the valid
values into a another table and do a sub-query. |