Updating multiple records
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Updating multiple records
Is it possible to use a DB2 database stage to update multiple records nfor a single row? I have a stream with a unique key, and I want to update all records with that key in a DB2 table.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
I'm having difficulty with this - it doesn't work if the record doesn't exist, and I have set the "Fail on row error" to "No". Is there any other way to do an update only if the row exists, and to just continue if it does not?
I have put in a sparse lookup, but performance is terrible.
I have put in a sparse lookup, but performance is terrible.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Sorry, I haven't worked with DB2... what does "it doesn't work if the record doesn't exist" mean? Do you get an error? Oracle wouldn't care and would happily update zero records, I seem to recall that DB2 cares.
Really seems to be unrelated to the original topic.
Really seems to be unrelated to the original topic.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
It was falling over... so I put in a sparse lookup which slowed it down tremendously. Then I noticed that I hadn't set the "Drop" setting on the Lookup stage, and the job was working just fine even though it was updating rows that didn't exist! I took out the sparse lookup, and now it's working fine. I don't know what I was doing wrong to make it fail earlier. So now it's fine.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Re: Updating multiple records
@ PhilHibbs - I want to achieve exactly opposite of this. If I get a multiple match after a doing a lookup then I want my job to abort. How do I do that? Any Idea?
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Re: Updating multiple records
Post another thread. As this thread is "resolved", you might miss out on valuable input from other people. By specifically asking me, you run the risk that I don't know and no-one else has ben asked.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Re: Updating multiple records
Exactly. As a matter of fact you've already got your own post on that subject, Palci, no need to run around and jump in other people's posts.PhilHibbs wrote:Post another thread.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers