Passing SAS Functions to SAP HANA

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

** (POWER(base, exponent)) LOG2 (LOG(2, value))
ABS LOWCASE (LOWER)
ARCOS (ACOS) MAX
ARSIN (ASIN) MIN
ATAN MINUTE
ATAN2 MOD (see note)
AVG MONTH
BYTE (CHAR(CAST(expression AS INTEGER))) QTR (CAST(TO_CHAR(value, 'Q') AS SMALLINT))
CEIL SECOND
COALESCE SIGN
COS SIN
COSH SINH
COT SQRT
COUNT STD (STDDEV)
DAY (DAYOFMONTH) STRIP (TRIM)
EXP SUBSTR (SUBSTRING)
FLOOR SUM
HOUR TAN
INDEX (LOCATE) TANH
LEFT (RPAD(LTRIM(value), LENGTH(value))) TRANWRD (REPLACE)
LENGTH TRIMN (RTRIM)
LENGTHC (LENGTH) UPCASE (UPPER)
LENGTHN (LENGTH) VAR
LOG (LN) WEEKDAY (DAYOFWEEK)
LOG10 (LOG(10, value)) 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 SAP HANA. Due to incompatibility in date and time functions between SAP HANA and SAS, SAP HANA might not process them correctly. Check your results to determine whether these functions are working as expected.

COMPRESS (REPLACE) TIME (CURRENT_TIME)
DATE (CURRENT_DATE) TIMEPART (CAST(expression AS TIME))
DATEPART (CAST(expression AS DATE)) TODAY (CURRENT_DATE)
DATETIME (CURRENT_TIMESTAMP) TRANSLATE
SYSDATE
Last updated: February 3, 2026