Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any size limit on IN-LIST in a SQL
1 declare
2 type c_cur is REF CURSOR;
3 cc c_cur;
4 inlist varchar2(32000);
5 wherecls varchar2(32000) := 'where partner in ( ';
6 begin
7 for i in 1 ..1000 loop
8 inlist := inlist || i||',';
9 end loop;
10 inlist := inlist ||' 0)';
11 open cc for 'select * from credit where credit_sid in ('||inlist;
12* end;
SQL> /
declare
*
ERROR at line 1:
ORA-01795: maximum number of expressions in a list is 1000
ORA-06512: at line 11
In article <3A243DEC.387FFBCA_at_sun.com>,
Madhu Konda <madhu.konda_at_sun.com> wrote:
> Is there any limit on how long the parameters can grow in IN list of
> select statement. We have values in Java array, and want to use those
> values in sql statements' IN Clause.
>
> select col1
> from tab1
> where col1 IN ( value1, value2, ....size limit?);
>
> Thanks,
> MK
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Nov 28 2000 - 18:51:38 CST