• That's great and I'll take a look at your suggested change.

    However the real problem I'm having is the procedure where I'm trying to award the lots. That's in a separate post. You can find the first one I did, without cursors, in my first post. You can find the version of it I did with cursors, in my uhm, third? post.

    The stuff I just posted was the setup for being able to try out the other procedure.