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: where clause pb

Re: where clause pb

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Tue, 6 Nov 2001 09:11:35 -0000
Message-ID: <3be7a991$0$8513$ed9e5944@reading.news.pipex.net>


Cause: In a host language program, a FETCH call was issued out of sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error.

Action: Parse and execute a SQL statement before attempting to fetch the data.

In other words the error is pointing you, not at the particular sql but at the program in which it resides (wether external or PL/SQL. You should be able to verify this by issuing just the sql on its own in sql*plus and seeing if it works.

--
Niall Litchfield
Oracle DBA
Audit Commission Uk



"gil guerillot" <gil.guerillot_at_ratp.fr> wrote in message
news:9s6bta$8h1$1_at_gotix.reseau.ratp...

> ORA-01002 fetch out of sequence
>
>
>
>
> Niall Litchfield <n-litchfield_at_audit-commission.gov.uk> a écrit dans le
> message : 3be69341$0$8511$ed9e5944_at_reading.news.pipex.net...
> > Yes you can certainly write in this format for example
> >
> > select num_rows from dba_tables
> > where table_name in (select table_name from user_tables where
> last_analyzed
> > is not null)
> > or owner = 'SYSTEM'
> >
> > which returns results on my system when run as a user with dba privs.
> >
> > perehaps you could post your actual sql and any error messages.
> >
> >
> > --
> > Niall Litchfield
> > Oracle DBA
> > Audit Commission Uk
> >
> > "gil guerillot" <gil.guerillot_at_ratp.fr> wrote in message
> > news:9s5sc4$2q4$1_at_gotix.reseau.ratp...
> > > I have a SQL query like this:
> > >
> > >
> > > Select *
> > > from table1
> > > where condition1 in(select field1 from table2
> > > where condition2=parameter1)
> > > or condition1 like parameter2
> > >
> > >
> > > Is it possible like this ?
> > > result never appear
> > >
> > >
> > >
> >
> >
>
>
Received on Tue Nov 06 2001 - 03:11:35 CST

Original text of this message

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