Product: | Syniti Data Replication (Syniti DR, fka DBMoto) |
Version: | All |
ID: | 1604 |
Summary: | Expression script examples of how to map two source fields to a single target field |
Here are a couple of examples of expression scripts which map two fields in the source table to a single field in the target table.
Assume the following set up on the source and target tables.
IBM Db2 for i/iSeries/AS400 table fields: ID integer, DT date, TM time
SQL Server table fields: ID integer, DTTM DateTime
When defining the replication, map the fields as shown below:
ID ---> ID
DTTM ---> [DT].Add([TM].TimeOfDay)
or
DTTM ---> New DateTime([DT].ToString() + " " + [TM].ToString())
Where both [DT].Add([TM].TimeOfDay) and New DateTime([DT].ToString() + " " + [TM].ToString()) are expressions.