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

SECOND

SECOND

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

SECOND Syntax

SECOND (char)

SECOND Examples

Input
Output
'15:08:37'
37
'2004-02-17-15.08.37.588000'
37
CREATE TABLE dt_table (time_col TIME, timestamp_col TIMESTAMP); INSERT INTO dt_table VALUES ('15:08:37', '2004-02-17-15.08.37.588000'); 1 row affected SELECT time_col, SECOND(time_col) AS result FROM dt_table; 1 row selected time_col result -------- ----------- 15:08:37 37 SELECT timestamp_col, SECOND(timestamp_col) AS result FROM dt_table; 1 row selected timestamp_col result -------------------------- ----------- 2004-02-17-15.08.37.588000 37

0 COMMENTS

We’d like to hear from you!