Table of Contents

Search

  1. Preface
  2. Scripting Overview
  3. Tcl Scripting
  4. SQL Scripting

Computing Example

Computing Example

This example shows how to multiply the values of two source columns and replicate the result to a new target column.
The following figure shows how the source table columns and virtual column map to the target table columns:
Use the following compute_total SQL expression:
:NEW.ITEM_PRICE*:NEW.QUANTITY
In this example, the compute_total SQL expression is assigned to the TOTAL_PRICE virtual column in the source table. The expression multiplies the REDO values of the ITEM_PRICE and QUANTITY columns. The result is replicated to the TOTAL_PRICE column in the target database.

0 COMMENTS

We’d like to hear from you!