Table of Contents

Search

  1. About the Data Vault SQL Reference
  2. Introduction to SQL Reference for Informatica Data Vault
  3. Date and Time Arithmetic
  4. WHERE Clauses
  5. UNION Operator
  6. Parameterized Query
  7. Functions

Data Vault SQL Reference

Data Vault SQL Reference

MONTH

MONTH

A date and time function that returns the month portion of a DATE or TIMESTAMP value as an INTEGER value.

MONTH Syntax

MONTH (char)

MONTH Examples

Input
Output
'02/17/2004'
2
'2004-02-17-15.08.37.588000'
2
CREATE TABLE dt_table (date_col DATE, timestamp_col TIMESTAMP); INSERT INTO dt_table VALUES ('02/17/2004', '2004-02-17-15.08.37.588000'); 1 row affected SELECT date_col, MONTH(date_col) AS result FROM dt_table; 1 row selected date_col result ---------- ----------- 2004-02-17 2 SELECT timestamp_col, MONTH(timestamp_col) AS result FROM dt_table; 1 row selected timestamp_col result -------------------------- ----------- 2004-02-17-15.08.37.588000 2

0 COMMENTS

We’d like to hear from you!