Inconsistent indicator variables for this cursor

Error code 2692
Probable cause

You have used an indicator variable when one was not previously used with the cursor, or you have not used an indicator variable when one was previously used with the cursor. Indicator variable usage must be consistent for the cursor.