Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-01795 although there is just 1 parameter used!

Re: ORA-01795 although there is just 1 parameter used!

From: Tony <andrewst_at_onetel.net.uk>
Date: 7 Jul 2004 04:14:05 -0700
Message-ID: <c0e3f26e.0407070314.1184ec9b@posting.google.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1089161781.96102_at_yasure>...
> Johannes Lebek wrote:
>
> > Hi @ll,
> >
> > I got the following error on my Oracle 9.2 machine:
> >
> > java.sql.SQLException: ORA-01795: maximum number of expressions in a
> > list is 1000
> >
> >
> >
> > However, the statement in question is:
> >
> > SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10,
> > col11, col12, col13, col14, col15, col16, col17, col18, col19, col20,
> > col21, col22 FROM table START WITH col1 IN (?) CONNECT BY (PRIOR col1 =
> > col8)
> >
> >
> >
> > The original statement definitely does not have too many parameters.
> > Is the problem caused by the RECURSION?
> >
> > I've heard that a subselect like SELECT * FROM table WHERE col1 IN
> > (SELECT col2 FROM table) is not affected by the
> > 1000-expressions-limitation.
> > Is this true? If yes, why does this apply to subselects but not to
> > recursion?
> >
> > Any help is greatly appreciated!
> > Thanks in advance,
> >
> > Johannes
>
> Without a clue as to what IN (?) is I can only guess.
>
> And my guess is that you put together a huge list of parameters.
>
> Daniel Morgan

In ODBC-type programming, ? represents a bind variable. Only one parameter can be assigned to the bind variable, so this IN list has exactly one element. Received on Wed Jul 07 2004 - 06:14:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US