Modify only the specific ROWs in DB2 table.
Posted: Mon Oct 07, 2024 12:30 pm
Hello,Keeping in mind that LOAD REPLACE overwrites the entire table, and LOAD RESUME appends the data. Keeping this in mind, consider the scenario:Imagine a table with 100 rows, and I need to update 30 of them. My approach:
- Unload the entire table.
- Remove the rows that don’t need to be updated, keeping only the ones that require changes in the unloaded file.
- Make the necessary updates to the selected records. This does not alter the keys.
- Reload the table using the modified file, ensuring that only the updated rows are affected.