Actually, one of our customers is using Oracle 9.2 as a back end. He tried to retrieve data from a table using...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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
Related Q&A from Azim Fahmi
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.