How to fix the Oracle error SQL-02118: Invalid row for a WHERE CURRENT OF operation?
In this post, you’ll learn more about the Oracle ErrorSQL-02118: Invalid row for a WHERE CURRENT OF operation with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
SQL-02118: Invalid row for a WHERE CURRENT OF operation
Reason for the Error SQL-02118: Invalid row for a WHERE CURRENT OF operation
Cause: An attempt was made to reference a nonexistent row using the CURRENT OF clause in an UPDATE or DELETE statement. This happens when no FETCH has been executed or when FETCH returns a “no data found” error that the program fails to trap.
How to fix the Error SQL-02118: Invalid row for a WHERE CURRENT OF operation ?
You can fix this error in Oracle by following the below steps
Action: Check that the last cursor operation succeeded and that the current row of the cursor is valid. The outcome of a cursor operation can be checked in two ways: implicit checking with the WHENEVER statement or explicit checking of SQLCODE in the SQLCA.
Leave Your Comment