In this post, you’ll learn about the error message -173 ur is specified on the with clause but the cursor is not read-only in the IBM DB2 database , the reason why it occurs along with the solution to fix it
IBM DB2 Error Message
-173 ur is specified on the with clause but the cursor is not read-only
Reason for the Error
The cursor is not a read-only cursor. WITH UR can be specified only if DB2 can determine that the cursor is read-only.
Solution
If the cursor is intended to be read-only but is ambiguous, add the FOR FETCH ONLY clause. If the cursor is updatable, change the isolation level specified on the WITH clause.