CDC Stage without key only value changes
Moderators: chulett, rschirm, roy
Are you sure that you haven't switched around your primary and secondary input links? Assume they are switched, would that explain your output behaviour?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Re: CDC Stage without key only value changes
So you had already gone back to the beginning...
If you are altering a flag to 'N', you would really also need the "copy" set and update to 'Y' otherwise these will remain 'N' (if currently so). Alternatively, add the update flag as 'Y' in your "after" set and use that as your comparison column, this way any record that exists in the "before" with flag set to Y and still exists in your "after" will be dropped from processing but if it is 'N' in your before and exists in your after, you update to Y (you would need to keep the "edit" rather than "copy" in this case)
By the fact you are checking if "name" and "sub_name" exist in the target table, it makes these the keymandyli wrote:1) I need to find out if there is no match records found between sources and target using 'Name '& 'sub_name' column then I have to insert with Flag 'Y'
So you want your full target data as your "before" set and your source data as "after" in CDC, use both "name" and "sub_name" as your key. Keep both inserts and deletes meaning if the row is in your "before" and not in your "after" you send through a delete record (code 2) and if it exists in your "after" and not "before" you send through an insert record (code 1)mandyli wrote:2) There is some rows in Target but not in Source then I have to update the Flag 'N'
If you are altering a flag to 'N', you would really also need the "copy" set and update to 'Y' otherwise these will remain 'N' (if currently so). Alternatively, add the update flag as 'Y' in your "after" set and use that as your comparison column, this way any record that exists in the "before" with flag set to Y and still exists in your "after" will be dropped from processing but if it is 'N' in your before and exists in your after, you update to Y (you would need to keep the "edit" rather than "copy" in this case)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: