I think I would first blindly load the data into a table with a fixed name, and then do the complicated logic with that. (There might be more direct, elegant solutions, but let's KISS).

You can dynamically construct your SQL statement to copy from external to internal table and then execute it with EXECUTE IMMEDIATE: http://download-west.oracle.com/docs...ynam.htm#13131