6.1.8 Updating a Table with a Conventional Path Load
You can use EDB*Loader with a conventional path load to update the rows within a table, merging new data with the existing data. When you invoke EDB*Loader to perform an update, the server searches the table for an existing row with a matching primary key:To use EDB*Loader to update a table, the table must have a primary key. Please note that you cannot use EDB*Loader to UPDATE a partitioned table.To perform an UPDATE, use the same steps as when performing a conventional path load:
1. Create a data file that contains the rows you wish to UPDATE or INSERT.
3. The following example uses the emp table that is distributed with the Advanced Server sample data. By default, the table contains:The following control file (emp_update.ctl) specifies the fields in the table in a comma-delimited list. The control file performs an UPDATE on the emp table:The data that is being updated or inserted is saved in the emp_update.dat file. emp_update.dat contains:Invoke EDB*Loader, specifying the name of the database (edb), the name of a database superuser (and their associated password) and the name of the control file (emp_update.ctl):edbldr -d edb userid=user_name/password control=emp_update.ctlAfter performing the update, the emp table contains:The rows containing information for the three employees that are currently in the emp table are updated, while rows are added for the new employees (BAKER and MILLS).