DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Expressions Limit in 'IN' List

  1. #1
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343

    Expressions Limit in 'IN' List

    Oracle says that the maximum number of expressions in a IN list is 1000 i.e. I cannot have more than 1000 expressions in my IN clause :
    SELECT .......... FROM ........ WHERE..... IN (1, 2, 3, ........1000 or more)

    Where is this parameter set ? Can I see/modify it ?

    Thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    I suspect you can't change it - I very much think that you shouldn't.

    If you need an IN(1000+ values) then I would say you have a design problem. Those 1000+ values should be in a table for maintenance reasons - you can then use: IN(select myValue from my_table).

    (or: EXISTS or a join)

  3. #3
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343
    This query is in the app and yes the code is going to be changed to use a subquery in the IN clause. I had this question because I am able to reproduce this error in one environment but not the other - both are Oracle 9.2 and both have the same codebase. Hence I wanted to know if this parameter could be set.

    Thanks.

  4. #4
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    Yes, we also had the same problem.
    We limit it to less than 1000.

    Regards
    anandkl
    anandkl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width