Maybe this helps
Thread #
1539386http://support.microsoft.com/kb/913050/eng>I got this:
>
>"The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information."
>
>This came after having created a very long command which includes the IN clauses with thousands of primary keys.
>
>I just had 38026 primary keys in that one. :)
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst