Table of Contents

Search

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

Date Manipulation Example

Date Manipulation Example

This example shows how to manipulate datetime values.
The following figure shows how the source table columns and virtual columns map to the target table columns:
The following SQL expressions use the Oracle EXTRACT function to get day, month, and year values from the TIME column:
extract_day
EXTRACT (DAY FROM :NEW.TIME)
extract_month
EXTRACT (MONTH FROM :NEW.TIME)
extract_year
EXTRACT (YEAR FROM :NEW.TIME)
The following SQL expressions get day, month, and year values from the TIME column for SQL Server targets:
extract_day
DATEPART (dd,:NEW.TIME)
extract_month
DATEPART (mm,:NEW.TIME)
extract_year
DATEPART (yyyy,:NEW.TIME)

0 COMMENTS

We’d like to hear from you!