Page 1 of 1

Posted: Tue Jul 03, 2012 9:31 am
by ArndW
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?

Posted: Tue Jul 03, 2012 1:02 pm
by mandyli
even I changed still not working.

Re: CDC Stage without key only value changes

Posted: Tue Jul 03, 2012 4:39 pm
by Kryt0n
So you had already gone back to the beginning...
mandyli 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'
By the fact you are checking if "name" and "sub_name" exist in the target table, it makes these the key
mandyli wrote:2) There is some rows in Target but not in Source then I have to update the Flag 'N'
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)

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)

Posted: Sat Jul 07, 2012 4:42 pm
by mandyli
Thanks Lot.

If I make Name and Sub_name as key what about change values?

Thanks
Man

Posted: Sun Jul 08, 2012 1:39 am
by ray.wurlod
You can always create alias columns, for example in a Transformer stage.