PLS-00364 loop index variable 'string' use is invalid
PLS-00364 loop index variable ‘string‘ use is invalid
A reference to a loop counter was found in an inappropriate context. For example, the following statement is illegal because the loop counter is used as the terminal value in its own range expression:
Action: Change the loop range expression so that it does not reference the loop counter. If you want to refer in the range expression to another variable with the same name as the loop counter, change either name or qualify the variable name with a label.