Adsense Ad

Wednesday 24 May 2017

Oracle: ORA-01002 Error Message

ORA-01002 Error Message

Learn the cause and how to resolve the ORA-01002 error message in Oracle.

Description

When you encounter an ORA-01002 error, the following error message will appear:
  • ORA-01002: fetch out of sequence

Cause

You tried to perform a FETCH at a time when it is not allowed.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

This error may occur if you perform a FETCH on an active cursor after all records have been fetched.

Option #2

This error may also occur if you perform a FETCH on a SELECT FOR UPDATE after a COMMIT has been issued.
You may want to consider utilizing cursor attributes to avoid these situations.

No comments: