View previous topic :: View next topic |
Author |
Message |
Narsimha Beginner
Joined: 03 Dec 2002 Posts: 27 Topics: 14
|
Posted: Tue Mar 04, 2003 1:01 am Post subject: DB2 LOAD Utility |
|
|
Hi,
Please find the following scenario.
If there is a table with 100 rows, and I want to modify some 20 rows in the table. using Load utility in the following way
1)I will unload the table
2)Delete the records that are not going to be updated and keep the records which are to be updated in the unloaded file.
3)Modify the records in the unloaded file(not the keys)
4)Load the table with the modified file, the table should get updated with the records that are modified in the file.
Is there any option in Load utility to perform the above steps?
( As far as I know LOAD REPLACE will load all the records and LOAD RESUME will append the records. But Is there any option in LOAD to performthe above steps)
Thanks,
Narsimha |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Mar 04, 2003 6:35 am Post subject: |
|
|
Narsimha,
Since your rows to be modified are less compared to the total no: of rows, i would take this approach.
option1 :
Delete the rows which you want to modify using a batch jcl.
Load RESUME the new modified as new rows.
Option 2:
Generate Sql UPDATE statements for the 20 rows to be modified and run it in batch
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
|
|