top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can you insert one row in the target if that row does not exists in the target and update if it exists?

+1 vote
391 views
How can you insert one row in the target if that row does not exists in the target and update if it exists?
posted Oct 14, 2015 by Sachin

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Use the session properties, In Target Properties use options Insert update else Insert Check boxes.

answer Oct 14, 2015 by Manikandan J
Similar Questions
+1 vote

I have a source with multiple columns -
minA, maxA, minB, maxB, minC, maxC, minD, maxD

and I have 2 columns in target min values, max values. How can i put the min values of elements in min values of target and same with max?

+2 votes

In a stored procedure, for the same table i want to UPDATE if exists else INSERT data.
How ca this be implemented?

+1 vote

i have taken target table as my lookup table using static cache.in source i have duplicate values.

in mapping i ahve used update strategy transformation but not i m not able update data in target table

Example:Initially(i mean after session Load)

source table Lookup table Target table

ID    Name           ID    Name            ID    Name    
1     A              1     A               1     A 
2     B                                    2     B

Now im inserting two more records

3      C
1      E

but its not updating below record

1    E

i am getting below error

One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "TABLE_NAME" from having duplicate values for the index key.

I know if i use dynamic lookup it will work correctly but in static. please give the reason ASAP.

...