In this blog post, let’s learn about the error message “365 Cursor must be on simple SELECT for FOR UPDATE.” in Hydra and the description of the error.
Error Message
365 Cursor must be on simple SELECT for FOR UPDATE.
Error Details
The cursor named in this statement (probably an OPEN statement) was declared with the FOR UPDATE clause. However, it has been associated with a SELECT statement that joins two or more tables or that uses UNIQUE, DISTINCT, GROUP BY, or UNION. Such a SELECT statement cannot be used in an update; there is no way to distribute the new data back into the multiple tables.
Review the declaration of the cursor. If it is declared FOR statement id, also review the PREPARE statement that set up that statement. You might need two cursors, one for general queries and another specifically for updating.
Leave a Reply