View previous topic :: View next topic
|
Author |
Message |
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
Hi All,
Can we use Load options
RESUME YES
REPLACE
together.
I want to replace the rows in DB2 with the updated rows in the flat file.
I am using utility to do LOAD process.
Please let me know this.
Sravani |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Is that you wanted updated selected records in table using updated records in file?
You cant make use of load utility directly
If size of the table is less unload it and compare with records in the file and create a fresh load file which needs to be present in the table and use LOAD replace
Or Compare the files and just check for the updated data and use programmatic method to update the table
Or Use Programmatic method to read and update the table ( If file has fewer records)
Or You can explain better about your requirement |
|
Back to top |
|
|
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
Prem,
My requirement is to load new inserts and updates in to the existing table from flat file.
I will have two diffenrent files for inserts aswell as updates. Inserts i am able to do with Resume yes option in LOAD.
Wheni am doing REPLACE option the complete data is being replaced with this new data and losing the old data.
UNLOAD and COMPAring the files may not work inmy case because i have some millions of data.
Please suggest if i can do this any other way. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
What is the size of the data do you expect in insert and update file? |
|
Back to top |
|
|
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
premkrishnan wrote: |
What is the size of the data do you expect in insert and update file? |
Around 1 million records. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Sravz,
What you can do is ?
Split INSERT and UPDATE records into separate files, if possible.
Load the insert and Write a program to read the update file and update it in DB2.
or
Do a combo using MERGE statement ?
Thanks,
Sushanth |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Bobby,
Good to "see" you've returned
d |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Thanks d.sch. |
|
Back to top |
|
|
|