Insert and updates
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 104
- Joined: Sat Dec 24, 2005 1:26 am
- Location: Bengaluru
Insert and updates
Hi,
I want perform insert if new record or update if exits (don't look for change columns)
Insert: if primary key does't exist in target ( can do with Change capture code=1)
Update some columns if key exists in target (if i use change capture it looks of change column which i don't want to perform)
Please give me hint.
I want perform insert if new record or update if exits (don't look for change columns)
Insert: if primary key does't exist in target ( can do with Change capture code=1)
Update some columns if key exists in target (if i use change capture it looks of change column which i don't want to perform)
Please give me hint.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Two questions:
1. Does the input data contain duplicate key values?
2. What alternative do you plan for detecting change when the row already exists in the target table?
1. Does the input data contain duplicate key values?
2. What alternative do you plan for detecting change when the row already exists in the target table?
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: 104
- Joined: Sat Dec 24, 2005 1:26 am
- Location: Bengaluru
Two questions:
1. Does the input data contain duplicate key values?
A- looking based on primary keys
2. What alternative do you plan for detecting change when the row already exists in the target table? ..
A-If the row exists with same key then i just want to update few columns in target table, thats it.
1. Does the input data contain duplicate key values?
A- looking based on primary keys
2. What alternative do you plan for detecting change when the row already exists in the target table? ..
A-If the row exists with same key then i just want to update few columns in target table, thats it.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What I was getting at in the first question is what happens if the same key arrives twice in the stream of input data? How do you need to play this?
You can only insert the first of them.
You can only insert the first of them.
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: 104
- Joined: Sat Dec 24, 2005 1:26 am
- Location: Bengaluru
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
RefDS
|
|
V ----> insert
source ----> Lookup ----> Transformer
----> update
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: 104
- Joined: Sat Dec 24, 2005 1:26 am
- Location: Bengaluru
Thanks for that. Soon i will be bororw a premier membership.
by then let me try to crack ur code.
Well by now... using join stage with left outer join
with left link=source and right link=target(reference)
and output contains is both new and existing records.
How to distinguish between between these records?
by then let me try to crack ur code.
Well by now... using join stage with left outer join
with left link=source and right link=target(reference)
and output contains is both new and existing records.
How to distinguish between between these records?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 104
- Joined: Sat Dec 24, 2005 1:26 am
- Location: Bengaluru
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Techincally, you've got 20,000+ people who could help you out here, however the vast majority only seem to post when they have a problem. It's a very small group that try to help others, but that's the way it is anywhere, the nature of the beast. And when the Alpha Male steps in, almost everyone else steps back from the kill and lets him have his fill.
Or maybe no-one else is silly enough to work weekends.
Last edited by chulett on Sun Sep 07, 2008 5:50 pm, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 104
- Joined: Sat Dec 24, 2005 1:26 am
- Location: Bengaluru
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are only five premium posters, one of whom is currently sailing (or riding out storms) in the Caribbean. Anyone else with constructive thoughts on any issue is welcome to post, but it's their choice whether they do or not.
Anyway, don't you have an official support provider?
Anyway, don't you have an official support provider?
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.