ORA-01795 : maximum number of expressions in a list is 1000.
You're slightly above that ;)
You have some options:
1)
Very quick & dirty and
only recommended if this is a
one-time query:
Split your IN-clause into multiple OR'ed IN-clauses where each one only contains max. 1000 values.
2) Create a temporary table, insert the values of your current IN-clause there and change your current query so that it does an inner join on that temporary table instead of the IN-clause.
3) Use something what in SQL-Server would be called Table Valued Parameters, I think it's a User Defined Type in Oracle, take a look here:
http://stackoverflow.com/questions/10217922/how-to-use-array-table-parameter-to-oracle-odp-net-10g-via-ado-net-c[
^]
Edit: Actually 3) isn't a whole new option, it's just an alternative way to 2) of inserting the values into a temporary table.