NUMTOYMININTERVAL Function | Data Types and Literals | Teradata Vantage - 17.10 - NUMTOYMINTERVAL - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

Converts numeric_value into an INTERVAL YEAR(4) TO MONTH value.

The return value data type is INTERVAL YEAR(4) TO MONTH.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Syntax

[TD_SYSFNLIB.] NUMTOYMINTERVAL ( numeric_value, interval_unit )

Syntax Elements

TD_SYSFNLIB.
Name of the database where the function is located.
numeric_value

A numeric argument.

If this syntax element is NULL, NULL is returned.

interval_unit

A character expression.

interval_unit specifies the unit of value for numeric_value. It must be one of the following case-insensitive values:
  • 'YEAR'
  • 'MONTH'

Any value that overflows the INTERVAL YEAR(4) TO MONTH value results in an error.

If this syntax element is NULL, NULL is returned.