Passing SAS Functions to Oracle

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

ABS MAX
ARCOS (ACOS) MIN
ARSIN (ASIN) MINUTE
ATAN SECOND
ATAN2 SIGN
AVG SIN
BAND SINH
CEIL SOUNDEX
COS SQRT
COSH STD (STDDEV_SAMP)
COUNT STRIP (TRIM)
DATETIME (SYSDATE) SUM
EXP TAN
FLOOR TANH
HOUR TRANSLATE (see note)
LOG TRIMN (RTRIM)
LOG10 UPCASE (UPPER)
LOG2 VAR (VAR_SAMP)
LOWCASE (LCASE)
Note: If more than three arguments are provided for the TRANSLATE function, then TRANSLATE is performed by SAS and the function is not passed to the database.

When the Oracle server is 9i or above, these additional functions are also passed.

COALESCE MONTH (EXTRACT)
DAY (EXTRACT) YEAR (EXTRACT)

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 Oracle. Due to incompatibility in date and time functions between Oracle and SAS, Oracle might not process them correctly. Check your results to determine whether these functions are working as expected.

DATE (TRUNC(SYSDATE))* SUBSTR
DATEPART (TRUNC)* TODAY (TRUNC(SYSDATE))*
INDEX (INSTR) TRANWRD (REPLACE)
LENGTH TRIM (TRIMN)
MOD

*Only in WHERE or HAVING clauses.

Last updated: February 3, 2026