Avoid Cursors inside a loop | CAST Appmarq