Passing SAS Functions to Teradata

SAS/ACCESS Interface to Teradata passes the following SAS functions to Teradata for processing. Where the Teradata function name differs from the SAS function name, the Teradata name appears in parentheses. For more information, see Passing Functions to the DBMS Using PROC SQL.

ABS MAX
ACOS MIN
ARCOSH (ACOSH) MINUTE
ARSINH (ASINH) MOD (see note)
ASIN MONTH
ATAN SECOND
ATAN2 SIN
AVG SINH
COALESCE SQRT
COS STD (STDDEV_SAMP)
COSH STRIP (TRIM)
COUNT SUBSTR
DATEPART TAN
DAY TANH
EXP TIMEPART
HOUR TRIM
INDEX (POSITION) UPCASE
LOG VAR (VAR_SAMP)
LOG10 YEAR
LOWCASE (LCASE)
Note: SAS does not modify non-integer arguments to the MOD function. If your DBMS does truncate non-integer arguments to MOD, then DBMS results for this function might vary from SAS results. For more information, see Functions Where Results Might Vary: MOD Function.

SQL_FUNCTIONS=ALL allows for SAS functions that have slightly different behavior from corresponding database functions that are passed down to the database. Only when SQL_FUNCTIONS=ALL can SAS/ACCESS Interface to Teradata also pass these SAS SQL functions to Teradata. Due to incompatibility in date and time functions between Teradata and SAS, Teradata might not process them correctly. Check your results to determine whether these functions are working as expected. For more information, see SQL_FUNCTIONS=LIBNAME Option.

DATE SOUNDEX
DATETIME (current_timestamp) TIME (current_time)
LEFT (TRIM) TODAY
LENGTHC (CHARACTER_LENGTH)

DATETIME, SOUNDEX, and TIME are not entirely compatible with the corresponding SAS functions. Also, for SOUNDEX, although Teradata always returns 4 characters, SAS might return more or less than 4 characters.

Last updated: February 3, 2026