Scalar Functions - Teradata Vantage - Analytics Database

Database Introduction

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-09-27
dita:mapPath
gtm1628096154303.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dsm1472253642401
lifecycle
latest
Product Category
Teradata Vantage™

A scalar function takes input parameters and creates a result.

When it is part of an expression, the function is invoked whenever expressions are evaluated for an SQL statement. When the function completes, the expression uses its result.

For example, the following request returns the current date plus 13 years.

   SELECT ADD_MONTHS (CURRENT_DATE, 12*13);

The following request returns the date 6 months ago.

   SELECT ADD_MONTHS (CURRENT_DATE, -6);