If you want to update values of certain fields inside database, one option is to make individual update statements in xl formulas as explained in another post and another option if you have huge datasets is to use MERGE commands from Oracle.
Steps:
In Oracle SQL developer, click on Table and click data tab-- click action and import.
Navigate to xls/csv make sure column names match and first header has column names.
Import and accept defaults.
Now you have the database with your xl/csv data in table.
Now we will merge it with our actual table.
with below statement.
MERGE into prodtable t using ( select * from temptable) s on (t.location=s.location)
when matched then
UPDATE SET t.fieldtoupdate = s.fieldtoupdate;
Your user should have insert update create rights on the schema where you are trying to do merge the data.
Keep Reading !
No comments:
Post a Comment