Scalar Function Support for ODBC - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ NewSQL Engine Release Summary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
hqm1512077988481.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1098
lifecycle
previous
Product Category
Software
Teradata Vantage

Beginning with ODBC Driver for Teradata Release 14.10, scalar functions had to be used within escape sequences. This restriction is removed. Scalar functions can be used without escape sequences because Teradata Database natively supports them. In addition, ODBC Driver for Teradata now supports the following scalar functions:

Function Call Purpose
BIT_LENGTH(s) Returns the length in bits of the specified string.
CONCAT(s1,s2[,...sn]) Concatenates two or more parameter values into a single string.
CURDATE() Returns the current date.
CURTIME() Returns the current local time.
DAYOFMONTH(e) Returns the number of days from the beginning of the month to the specified date.
DAYOFWEEK(e) Returns the day of the week on which the specific date falls.
HOUR(e) Returns the hour field of the specified time expression.
LOCATE(s1,s2[,p]) Returns the position in s2 where the substring s1 starts.
MINUTE(e) Returns the minute field of the specified time expression.
MOD(x1, x2) Returns the remainder from a division.
MONTH(e) Returns the number of months from the beginning of the year to the specified date.
NOW() Returns the current date and time.
SECOND(e) Returns the second field of the specified time expression.
UCASE(s) Returns an equal string, which all lowercase characters convert to uppercase.
WEEK(e) Returns the number of weeks from the beginning of the year to the specified date.
YEAR(e) Returns the year of the specified date.
The following functions were updated to support ODBC Driver:
Function Call Change
CURRENT_DATE() Can be called with or without parenthesis.
LENGTH(s) Supports numeric expressions.
LTRIM(s) Operates on numeric expressions.
RTRIM(s) Operates on numeric expressions.
SUBSTRING(s,p[,n]) Returns a substring of s starting at the position p, optional length n.

Benefits

  • Customers do not have to change existing projects with scalar functions.
  • Teradata supports existing scalar functions across all Teradata products and platforms.

Additional Information

For more information, see Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates, B035-1145.