Inserting a list of emails into multiple rows on the same column

insertoracleplsql

I have a list of emails of staff members and would like to:

  1. insert them into multiple rows on the same column (single column only for emails)
  2. the same question above but would like to replace them with old ones.

Best Answer

You should provide details about:

  1. The table you want to update
  2. The format of the data of the email list.

The obvious problem is that just a list of email adresses wont't help much, since you don't know who they belong to. So what is the unique key for the table identifying the employee, and is that key also in the list of email adresses?

If the list provides the key, what you can do is load that list into a temp table (using sql loader), and then run a procedure or script that updates the table based on the values and unique key of the employee from the temp table, and then when done and no errors, remove the temp table.