I'm using Oracle's DB.I have a table say T. It has following columns id, att1,att2,att3. Now for a large amount of data att3 is blank. I've created a csv file which contains data in the format id,att3 it has a lot of data. How do I updatefrom this file to existing rows? Any way of doing it via pl/SQL
Asked
Active
Viewed 47 times
0
-
2You'll first have to bulk load it into a new table (which you can drop afterwards). You can perform the update from there. – HoneyBadger Jan 16 '18 at 15:01
-
1Can you clean up your questions, are you asking to `INSERT` rows or are you asking to `UPDATE` your question describes updating but asks to insert. – Andrew Jan 16 '18 at 15:01
-
I meant how to update the existing rows! Thanks updated the questions – vishu Jan 16 '18 at 15:02
-
@HoneyBadger Any pointers on how to do that? – vishu Jan 16 '18 at 15:02
-
1: Create Table, 2: Bulk load csv data, 3: Update existing table, 4: Drop table created in step 1. – HoneyBadger Jan 16 '18 at 15:05
-
I don't have permissions to create a new table :( ! any alternatives?? – vishu Jan 16 '18 at 15:14
-
Have a look [here](https://stackoverflow.com/questions/1952714/update-oracle-table-with-values-from-csv-file) – HoneyBadger Jan 16 '18 at 15:34
1 Answers
0
Which database engine are you using? The answer might vary depending on that. But this post here How to update selected rows with values from a CSV file in Postgres? is similar to what you're asking, I'm sure you can adapt it to your needs.

Esteban Garcia
- 2,171
- 16
- 24