Take the 2-minute tour ×  I have comma delimited id's that I
want to use in NOT IN clause.. I'm using oracle 11g.  select *
from table where ID NOT IN (1,2,3,4,...,1001,1002,...)  results
in  ORA-01795: maximum number of expressions in a list is 1000
I don't want to use temp table. am trying considering doing this
select * from table1 where ID NOT IN (1,2,3,4,…,1000) AND  ID
NOT IN (1001,1002,…,2000)  Is there any other better workaround
to this issue?  share|improve this question No..id's are not
predictable. –  questborn Sep 22 '12 at 0:41 Where the values of
those IDs come from? –  Nicholas Krasnov Sep 22 '12 at 12:54
What is the motivation for not using a temp table? –  Shannon
Severance Sep 22 '12 at 21:09 And where does the SQL for above
query live? Client side? Inside a stored procedure, function,
package? Or somewhere else? –  Shannon Severance Sep 22 '12 at
21:10 add comment  1 Answer  You said you don't want to, but:
use a temporary table. That's the correct solution here.  Query
parsing is expens