Page 1 of 1

diff between udate then insert and insert then update

Posted: Wed Mar 23, 2011 12:12 am
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

Posted: Wed Mar 23, 2011 1:04 am
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.