Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Strange Oracle 8 ORA-01002
ORA-01002 fetch out of sequence
Cause: This error means that a fetch has been attempted from a cursor which is no longer valid. Note that a PL/SQL cursor loop implicitly does fetches, and thus may also cause this error. There are a number of possible causes for this error, including:
Fetching from a cursor after the last row has been retrieved and the ORA-1403 error returned.
If the cursor has been opened with the FOR UPDATE clause, fetching after a COMMIT has been issued will return the error.
Rebinding any placeholders in the SQL statement, then issuing a fetch before reexecuting the statement.
Action:
Do not issue a fetch statement after the last row has been retrieved - there are no more rows to fetch.
Do not issue a COMMIT inside a fetch loop for a cursor that has been opened FOR UPDATE.
Re-execute the statement after rebinding, then attempt to fetch again.
In article <86sv0d$ntd$1_at_nnrp1.deja.com>,
ruku_at_my-deja.com wrote:
> Hi everybody,
>
> I have a simple sql query with outer joins works fine when tested in
> Oracle 8 server from a sql 7.3 client. But the same query when tested
> on the same Oracle 8 database from a Oracle8 client it gives me
>
> ERROR- 01002 Fetch out of sequence.
>
> Could anybody help me to figure out what's happening here. Attached is
> the sql script
>
> thanks
> Rukmini
>
> SELECT
> SERVICE_REQUEST.ID,
> DESC_TEXT.BIG_TEXT,
> DESC_TEXT2.BIG_TEXT
> FROM
> rmoc63.SERVICE_REQUEST,
> rmoc63.UTILITY,
> rmoc63.ACTIVITY,
> rmoc63.STREET,
> rmoc63.STREET xSTREET,
> rmoc63.STREET mSTREET,
> rmoc63.DESC_TEXT DESC_TEXT,
> rmoc63.DESC_TEXT DESC_TEXT2
> WHERE
> SERVICE_REQUEST.UTILITYID = UTILITY.CODE (+) AND
> SERVICE_REQUEST.WORKDESCID = ACTIVITY.CODE (+) AND
> SERVICE_REQUEST.STREETID = STREET.ID (+) AND
> SERVICE_REQUEST.XSTREETID = xSTREET.ID (+) AND
> SERVICE_REQUEST.MAILSTREET = mSTREET.ID (+) AND
> SERVICE_REQUEST.ID = DESC_TEXT.P_ID (+) AND
> SERVICE_REQUEST.ID = DESC_TEXT2.P_ID (+) AND
> SERVICE_REQUEST.ID = 2046729 AND
> DESC_TEXT2.TABLE_NAME(+) = 'SERVICE_REQUEST' AND
> DESC_TEXT2.FLD_NAME(+) = 'LOCDESC' AND
> DESC_TEXT.TABLE_NAME(+) = 'SERVICE_REQUEST' AND
> DESC_TEXT.fLD_NAME(+) = 'REQUESTTEXT'
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Jan 28 2000 - 00:00:00 CST