0

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

7
  • 2
    You'll first have to bulk load it into a new table (which you can drop afterwards). You can perform the update from there. Commented Jan 16, 2018 at 15:01
  • 1
    Can 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. Commented Jan 16, 2018 at 15:01
  • I meant how to update the existing rows! Thanks updated the questions Commented Jan 16, 2018 at 15:02
  • @HoneyBadger Any pointers on how to do that? Commented Jan 16, 2018 at 15:02
  • 1: Create Table, 2: Bulk load csv data, 3: Update existing table, 4: Drop table created in step 1. Commented Jan 16, 2018 at 15:05

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.