• Thanks, much, it is exactly like what I wrote too.

    It looks like we don't need the cursor. Not sure why PLSQL uses that.