diff between udate then insert and insert then update

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ds@tcs
Participant
Posts: 24
Joined: Thu Mar 17, 2011 6:26 am
Location: chennai
Contact:

diff between udate then insert and insert then update

Post by ds@tcs »

Hi
what is the difference between udate then insert and insert then update
in upsert method at Oracle target stage while loading data.

How it effets the data if we use update then insert method
and How it effets the data if we use insert then update method
Regards
Sankar
ersunnys
Participant
Posts: 29
Joined: Wed Sep 13, 2006 1:39 pm
Location: Singapore

Post by ersunnys »

Name tells you the difference...

update then insert will update first and if update fails then insert.


insert then update will insert first and if insert fails then update.
In "insert then update" update will only happen if your key have a unique constraint defined on DB level, else your insert will be successful resuld in duplicate record.
Regards,
Sunny Sharma.
Post Reply