Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

AchyuthB
2012-02-09 06:04:52

Hi Orel,

I tried what you said. But it does not seem to be working for me.
It gives me the below error
"Cannot insert duplicate key row in object 'dbo.DG_CONTROL' with unique index"

Please find the screen shots attached. Please let me know what is wrong in my approach.

Thank you
Achyuth

AchyuthB
2012-02-08 16:02:45

Hi Orel,

Thank you very much for the reply.
I am not very sure how to do that.
Could you please explain me with a simple example?

Achyuth

Or3l
2012-02-08 14:16:15

Hi,
You could add a lookup(CONTROL) on your tmap and make an inner join on the eight column instead of defining these column as key. Then you catch the rejected rows and the matched ones.

AchyuthB
2012-02-08 12:44:47

I have the below scenario. Can you please suggest me how to go ahead with this.

I select values from PositionActivity Table and insert values to CONTROL Table after doing some enrichments.

1) The CONTROL table has a column "DATA_GRP_CTL_NUM" which is unique.
2) The CONTROL table also has some other eight columns as unique.

Part of the insert/update Logic is as follows.

if All the Eight columns are same then,
   UPDATE CONTROL table values WHERE DATA_GRP_CTL_NUM = <existing DATA_GRP_CTL_NUM value>

In order to check whether the values are to be inserted or updated, i have specified all these eight columns as Keys in Talend, and it work fine.
But to update those rows, i want to update based on the DATA_GRP_CTL_NUM value.
I cannot add DATA_GRP_CTL_NUM column as Key. If I add, then Insert or Update logic of the talend will fail (as DATA_GRP_CTL_NUM will never be same for two rows).

Please find the image attached.

Thank you
Achyuth

Board footer

Powered by FluxBB