• Without seeing the DB, I can suggest 2 steps:

    Check how many records are returned by the query in the cursor declaration.

    If 0 rows are returned then the body of the cursor is never executed so no insert's.

    The insert appears inside the body of a 'if' statement.

    It could happen that the if condition is false for each row of the cursor.

    regards