converting varchar to number while passing to IN clause
If you want to go down this route (be aware there's a limit of 4000 values per IN, and all of the individual SQL statements are going to flood your shared pool, potentially causing performance problems), you can alter your code to use execute immediate and concatenate the IN list into the query.

You'd be better off combining the 2 queries in your code into a single query, and avoiding this completely.