0

I have a .csv file, which contains id & name. I want to update the names in a database table based upon the id. I'm not sure whats the best way to achieve this. I think it can be done through stored procedures but i'm not sure how i could accomplish it. ANy references or code would be appreciated.

Aazim
  • 750
  • 2
  • 11
  • 24
  • You can use a java code to insert. Let me know if you want code samples – ngrashia Jun 03 '14 at 11:44
  • There are 2 separate systems, hence, we would have to get data through a text file. Java code would require production deployment first, which is what I'm trying to avoid. – Aazim Jun 03 '14 at 11:47
  • @Aazim Why don't you use `SQL*Loader`? – Jacob Jun 03 '14 at 11:51
  • Yes, i read about it. But isn't SQL Loader used to insert data in the database . I can't use it for update. – Aazim Jun 03 '14 at 11:56
  • @Aazim Yes you are right, SQL Loader is for inserts, not updates. Having said this what you could do is create a temporary table and insert data into this table and then run an update statement with newly created table based on `id`. – Jacob Jun 03 '14 at 12:01
  • @Aazim If you use TOAD, then you could easily load data from .csv file to database table and then do as what been mentioned in my previous comment. – Jacob Jun 03 '14 at 12:02
  • you can refer to this answer http://stackoverflow.com/questions/14823382/read-text-file-to-insert-data-into-oracle-sql-table – MKYuones Jun 03 '14 at 12:12

0 Answers0