Datstage solutions, knowledge base, FAQ and best practices



2.17. Database update actions in ORACLE stage



The destination table can be updated using various Update actions in Oracle stage. Be aware of the fact that it's crucial to select the key columns properly as it will determine which column will appear in the WHERE part of the SQL statement. Available actions:
  • Clear the table then insert rows - deletes the contents of the table (DELETE statement) and adds new rows (INSERT).
  • Truncate the table then insert rows - deletes the contents of the table (TRUNCATE statement) and adds new rows (INSERT).
  • Insert rows without clearing - only adds new rows (INSERT statement).
  • Delete existing rows only - deletes matched rows (issues only the DELETE statement).
  • Replace existing rows completely - deletes the existing rows (DELETE statement), then adds new rows (INSERT).
  • Update existing rows only - updates existing rows (UPDATE statement).
  • Update existing rows or insert new rows - updates existing data rows (UPDATE) or adds new rows (INSERT). An UPDATE is issued first and if succeeds the INSERT is ommited.
  • Insert new rows or update existing rows - adds new rows (INSERT) or updates existing rows (UPDATE). An INSERT is issued first and if succeeds the UPDATE is ommited.
  • User-defined SQL - the data is written using a user-defined SQL statement.
  • User-defined SQL file - the data is written using a user-defined SQL statement from a file.


Back to the list of all Datastage FAQ topics