Updating a view in oracle

updating a view in oracle-61

You should use the MERGE statement to select rows from one or more sources for insert or update of one or more tables.

The decision to perform an insert or update is based on conditions specified by you.

What's more, we can wrap up the whole transformation process into this one Oracle MERGE command, referencing the external table and the table function in the one command as the source for the MERGED Oracle data.

file,10) full (contracts_file) */ * from contracts_file ))) f on d.contract_id = f.contract_id when matched then update set desc = f.desc, init_val_loc_curr = f.init_val_loc_curr, init_val_adj_amt = f.init_val_adj_amt when not matched then insert values ( f.contract_id, f.desc, f.init_val_loc_curr, f.init_val_adj_amt); In Oracle Database 10g, the MERGE statement has been extended to cover a larger variety of complex and conditional data transformations, allowing faster loading of large volumes of data.

MERGE is what is known as a deterministic statement.