Passing SAS Functions to Amazon Redshift

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

ABS MINUTE
ARCOS (ACOS) MOD (see note)
ARSIN (ASIN) MONTH
ATAN QTR
ATAN2 REPEAT
BYTE SECOND
CEIL SIGN
COALESCE SIN
COS SQRT
DAY STD (STDDEV_SAMP)
EXP STRIP (BTRIM)
FLOOR SUBSTR (SUBSTRING)
HOUR TAN
INDEX (POSITION, STRPOS) TRANWRD (REPLACE)
LENGTH TRIMN (RTRIM)
LENGTHN (LENGTH) UPCASE (UPPER)
LOG (LN) VAR (VAR_SAMP)
LOG10 (LOG) WEEKDAY
LOWCASE (LOWER) YEAR
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 the SAS/ACCESS engine also pass these SAS SQL functions to Amazon Redshift. Because of incompatibility in date and time functions between Amazon Redshift and SAS, Amazon Redshift might not process them correctly. Check your results to determine whether these functions are working as expected.

COMPRESS LENGTHC (CHARACTER_LENGTH)
DATE (CURRENT_DATE) ROUND
DATEPART TODAY (CURRENT_DATE)
DATETIME (GETDATE) TRANSLATE
Last updated: February 3, 2026