Problem solve Get help with specific problems with your technologies, process and projects.

ORA-01002: fetch out of sequence error

Actually, one of our customers is using Oracle 9.2 as a back end. He tried to retrieve data from a table using...

a simple SELECT (select * from state) statement. He got an error message saying that "ORA-01002: fetch out of sequence". At the same time, I have tried on my machine using SQL*Plus, and also Frontend. It works fine for me by using both. What could be the reasons to get this kind of error message using a simple select statement?

Are you sure he is not running the Select statement as part of a cursor? Usually you will get the error if you are attemping to execute a commit on the rows retrieved by the SQL statement without specifying a FOR UPDATE clause or if you are attempting to execute the statement again even after the last row has been retrieved by the cursor (in this case the cursor is defined as select * from state according to your example).

Dig Deeper on Using Oracle PL-SQL

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.