Hi there,
A job needs to insert a record into a table. before inserting, the table is searched to see if the record is already in the table. If it is, brings back its primary key. The Database is DB2 7.2.9. When the job is run, it hangs up. How can the transaction be set to allow the search and insert a table at the same time?
Thanks every body,
How to handle serach and insert a table at the same time?
Moderators: chulett, rschirm, roy
Best Practice would have you create, in a "preprocessing" step or job, a hash file with all of the current business keys and their corresponding surrogate keys. Ideally, you would constrain that build to whatever records are currently staged for processing. Then your lookup can be done against the hash file and a decision made based on the success or failure of that lookup. As noted, you could also split out seperate links for your Update and your Insert actions.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers