ORA-01795, limit on in clause
405508Mar 15 2004 — edited Mar 13 2012hi guys,
I have the following query,
Select
shogen_no,
shogen_desc,
disp_turn
From
shogen
where
shogen_no in ('one', 'two', 'three', ..........'more than thousand')
When I try to run it, the ORACLE (8.1.6) gives me following error:
ORA-01795 maximum number of expressions in a list is 1000
Can anyone explain the situation?
1) Cant we put more than 1000 values in 'in clause'.
2) What is the other way of doing it.
I am running this query in a PL/SQL procedure. First of all I gather the values and put them in a varchar2 (shogenList). Then I put that variable in the 'in clause' i.e. where shogen_no in ('||shogenList||')..
Thanx for any help
Omer