Table of Contents

Search

  1. Preface
  2. Backing Up and Restoring the Data Vault
  3. Configuring Centera as a Remote Data Vault Store
  4. Configuring Data Archive for a Legacy Source Using Legacy Adapters
  5. Data Archive Seamless Access for PeopleSoft
  6. Data Archive Transaction Restore API
  7. Dropping and Truncating Partitions in Data Archive
  8. How to Create Business Rules to Archive and Purge Transactional Data
  9. How to Uninstall Data Archive 5.1
  10. How to Uninstall Data Archive 5.3
  11. How to Use Scripts to Change Database User Passwords in the ILM Repository
  12. IBM DB2 Database Connectivity and Setup for Data Archive
  13. Installing Data Visualization
  14. Integrating Third-Party Schedulers in ILM Engine
  15. Parallel Processing in Data Archive
  16. Seamless Access Configuration for Siebel Applications
  17. Seamless Access Setup for Oracle E-Business Suite
  18. Using the Data Vault Service JDBC Driver to Connect to the Data Vault
  19. Using Multiple Engines in an ILM Environment
  20. Using PowerExchange ODBC Connections in a Data Archive Retirement Project
  21. Discovering Foreign Key Relationships in Enterprise Data Manager

Data Archive How-To Guide

Data Archive How-To Guide

The Set Condition Type

The Set Condition Type

The SQL UPDATE statement for the SET condition type is written as follows:
UPDATE interim A SET INVOICE_NOT_CLOSED = (SELECT DECODE(H.invoice_status,’CLOSED’,0,1) FROM ap_invoice_header H WHERE H.invoice_header_id=A.invoice_header_id AND H.invoice_status <> ‘ CLOSED’);
The SET condition type is the SET clause of the UPDATE SQL statement. In EDM this is written as:
(SELECT DECODE(H.invoice_status,’CLOSED’,0,1) FROM ap_invoice_header H WHERE H.invoice_header_id=A.invoice_header_id AND H.invoice_status <> ‘ CLOSED’)
There are two things to note about how this SQL statement is constructed. First, a DECODE is used to enforce the rule. DECODE (in Oracle, CASE using ANSI SQL) allows you to use IF-ELSE logic. IF invoice_status = 'CLOSED', then set INVOICE_NOT_CLOSED to 0, which means it passed the rule. ELSE if invoice_status equals any other value, then set INVOICE_NOT_CLOSED to 1, which means it failed the rule. Second, a join to the interim table is included to ensure each row in the interim is updated - H.invoice_header_id=A.invoice_header_id.
The main difference between SET and WHERE is that SET updates every single row in the interim table whereas WHERE updates only the rows returned by the condition statement. For this reason the WHERE condition type is typically used in lieu of the SET condition type.