Updating a single column in a hash file.
Moderators: chulett, rschirm, roy
Updating a single column in a hash file.
Is it possible to update just a single column in a hash file without losing the rest of the data on the record? I have a hash file records that consists of a key, a status, and some other data. I want to just update the status but when I do just the single field the rest of the data is cleared. Is it possible to do this without reading the record first to get other data?
Keith
No, not that I am aware of... as least not directly. You may be able to access the hash via a UV stage and then do 'normal' SQL against the data. You'd need to either have the hash in your Project or create a VOC record for it (if pathed) for the UV stage to work.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I also advocate the UV stage. The other method you specified, of reading the record first, updating it, and overwriting does work using Hashed File stages if you have some particular reason for wanting to do so. In this case, make sure that the link used for reading the record has "lock for update" set in its properties.
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.