Better solution for "merge into .."?
dusooApr 12 2007 — edited Apr 12 2007Hi everyone,
is there something better then using "merge into" in plsql?
Im receiving dump data every 15 minutes. Those data are loaded into basic tables. Then every hour, i'm running plsql procedure, that is inserting those data based on some rules - like agregated, cumulated, and so on into the final tabl(e|s). It may happen in some cases, that i have to reimport those data for some last couple of days, then i have to rerun my procedure on those days. So i'm using merge for this situation = merge into .. using ... on (keys) when matched - update, when not matched insert. I was thinking to use insert, and exception handler - DUP_VAL_ON_INDEX - for update. But i guess it will not change anything.
thanks for any advice