>I am getting "Nesting error" that points to ENDFOR.
>What kind of problem would be related to that?
>In the loop I am inserting a value into a cursor. That's all.
>
>Thanks
You have one more ENDFOR than needed or you forget to put ENDIF somewhere.
Usually that error happens when your opened blocks (like IF, FOR, DO WHILE, SCAN etc) didn't match the closing ones.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.