keep old values in columns when updating Oracle table?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 6
- Joined: Thu Oct 12, 2006 1:05 pm
keep old values in columns when updating Oracle table?
I am using Server jobs. I have to read XML file with 15 tags as input to update exisitng Oracle table with 15 columns. All XML tags are optional except ID(primary key) column. So, Each XML message is not neccesserily containing all values in all messages. If mesage 1 comes with column 4 with null value and other fileds with valid values, I have to update with new values in table with values from XML except for column 4. I am not sure till message comes to processing which field is coming as null. In summary I can say that, if one field is null in input I want ot keep the exisitng value for the corresponding column in table's row, but update other columns for that row. I have to use only one job. How can I solve my problem? I can't use PX in this case for other reasons. Thank you for your help.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
Perform a lookup against the target table, or a hashed file containing relevant rows and columns from the target table. This will allow you to determine the current values, which you can use in the UPDATE statement if the source value is null.
Perform a lookup against the target table, or a hashed file containing relevant rows and columns from the target table. This will allow you to determine the current values, which you can use in the UPDATE statement if the source value is null.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 6
- Joined: Thu Oct 12, 2006 1:05 pm