Exasol
Exasol Common Exasol add_months ( date_expression , integer_expression ) Returns the datetime resulting from adding "integer_expression" months to "date_expression". ascii ( string_expression ) Returns a number representing the ASCII code value of the leftmost character of "string_expression". Example: ascii ( 'A' ) Result: Returns '65' ceil ( numeric_expression ) Returns the smallest integer greater than or equal to "numeric_expression". character_length ( string_expression ) Returns the number of logical characters in "string_expression". The number of logical characters can be distinct from the number of bytes in some East Asian locales. chr ( integer_expression ) Returns the character that has the ASCII code value specified by "integer_expression". "Integer_expression" should be between 0 and 255. concat ( string_expression1 , string_expression2 ) Returns a string that is the result of concatenating, or joining, "string_expression1" to "string_expression2". Example: concat ( [Sales (query)].[Sales staff].[First name], [Sales (query)].[Sales staff].[Last name] ) Result: Returns the first name and family name; e.g., Bob Smith. decode ( expression , search , result [ , search , result ]... [ , default ] ) Compares "expression" to each search value one by one. If "expression" is equal to a search, then it returns the corresponding result. If no match is found, it returns "default", or if "default" is omitted, it returns null. dump ( expression [ , numeric_expression1 [ , numeric_expression2 [ , numeric_expression3 ] ] ] ) Returns internal representation of "expression" with the format of "numeric_expression1" starting from position "numeric_expression2" for "numeric_expression3" characters. greatest ( expression_list ) Returns the greatest value in "expression_list". instr ( string_expression1, string_expression2 [ , integer_expression1 [ , integer_expression2 ] ] ) Searches "string_expression1" starting at position "integer_expression1" for the "integer_expression2" occurrence of "string_expression2". If "integer_expression1" is negative, then the search occurs backwards from the end of "string_expression1". Returns an integer indicating the position of "string_expression2". least ( expression_list ) Returns the least value in "expression_list". length ( string_expression ) Returns the number of characters in "string_expression". lpad ( string_expression1, integer_expression [ , string_expression2 ] ) Returns "string_expression1" left-padded to the length defined by "integer_expression" with occurrences of "string_expression2". If "string_expression1" is longer than "integer_expression", the appropriate portion of "string_expression1" is returned. ltrim ( string_expression1 [ , string_expression2 ] ) Returns "string_expression1" with leading characters removed up to the first character not in "string_expression2". Example: ltrim ( 'xyxXxyAB' , 'xy' ) Result: XxyAB months_between ( date_expression1 , date_expression2 ) Returns the number of months from "date_expression1" to "date_expression2". If "date_expression1" is later than "date_expression2" then the result will be a positive number. The days and time portion of the difference are ignored, so the months are not rounded unless "date_expression1" and "date_expression2" are the last days of a month. nvl ( expression1 , expression2 ) Returns the value of "expression1" if "expression1" is not NULL. If "expression1" is NULL, then returns the value of "expression2". Example: nvl ( [Unit sale price] , 0 ) Result: Returns the unit sale price, or returns 0 if the unit sale price is NULL. regexp_instr ( string_expression1 , string_expression2 [ , numeric_expression1 , numeric_expression2 ] ) Returns the position in "string_expression1" (starting at 1) at which the regular expression "string_expression2" matches. The optional parameter "numeric_expression1" defines from which position the search shall begin (starting with 1). The optional positive number "numeric_expression2" defines which occurrence shall be searched for. regexp_replace ( string_expression1 , string_expression2 [ , string_expression3 , numeric_expression1 , numeric_expression2 ] ) Replaces occurrences of "string_expression2" in "string_expression1" by "string_expression3". The optional parameter "numeric_expression1" defines from which position the search shall begin (starting with 1). The optional positive number "numeric_expression2" defines which occurrence shall be searched for. regexp_substr ( string_expression1 , string_expression2 [ , numeric_expression1 , numeric_expression2 ] ) Returns a substring of the parameter "string_expression1". The parameter "string_expression2" defines a regular expression to be searched for. The optional parameter "numeric_expression1" defines from which position the search shall begin (starting with 1). The optional positive number "numeric_expression2" defines which occurrence shall be searched for. round ( numeric_expression [ , integer_expression ] ) Returns "numeric_expression" rounded to the nearest value "integer_expression" places right of the decimal point. If "integer_expression" is negative, "numeric_expression" is rounded to the nearest absolute value "integer_expression" places to the left of the decimal point. Rounding takes place before data formatting is applied. Example: round ( 125 , -1 ) Result: Returns 130 soundex ( string_expression ) Returns a character string containing the phonetic representation of "string_expression". {user} { user } Returns the username of the current user. replace ( string_expression1 , string_expression2 [ , string_expression3 ] ) Replaces all occurrences of "string_expression2" in "string_expression1" with "string_expression3". If "string_expression3" is not specified, then it removes all occurrences of "string_expression2". reverse ( string_expression ) Reverses the order of all characters in "string_expression". rpad ( string_expression1 , integer_expression [ , string_expression2 ] ) Returns "string_expression1" right-padded to length "integer_expression" with occurrences of "string_expression2". If "string_expression1" is longer than "integer_expression", the appropriate portion of "string_expression1" is returned. If "string_expression2" is not specified, then occurrences of "string_expression2" are replaced with spaces. rtrim ( string_expression1 [ , string_expression2 ] ) Returns "string_expression1" with the final characters removed after the last character not in "string_expression2". If "string_expression2" is not specified, the final space characters are removed. Example: rtrim ( 'ABxXxyx' , 'xy' ) Result: Returns 'ABxX' sign ( numeric_expression ) Returns an indicator of the sign of "numeric_expression", +1 if positive, 0 if zero, or -1 if negative. substr ( string_expression , integer_expression1 [ , integer_expression2 ] ) Returns the substring of "string_expression" that starts at position "integer_expression1" for "integer_expression2" characters or to the end of "string_expression" if "integer_expression2" is omitted. The first character in "string_expression" is at position 1. Example: substr ( [Sales (query)].[Sales staff].[Position code], 3 , 5 ) Result: Returns characters 3 to 7 of the position codes. {sysdate} { sysdate } Returns a datetime value representing the current date and time of the computer that the database software runs on. to_char ( expression [ , string_expression ] ) Returns the string representation of "expression" with the format of "string_expression". "Expression" can be either a date value or a numeric value. to_date ( expression1 [ , string_expression2 [ , string_expression3 ] ] ) Converts "expression1" to a datetime value as specified by the format "string_expression2". The first argument "expression1" may be of type string or numeric. "String_expression3" specifies the format elements, such as language. to_date ( '2013-02-27 15:13:14' , 'YYYY-MM-DD HH24:MI:SS' ) Result: Returns datetime with value '2013-02-27 15:13:14'. to_date ( '2013-02-27 15:13:14' , 'YYYY-MM-DD HH24:MI:SS' , 'NLS_DATE_LANGUAGE = American' ) Result: Returns datetime with value '2013-02-27 15:13:14'. to_number ( string_expression1 , string_expression2 , string_expression3 ) Converts "string_expression1" to a numeric value as specified by the format "string_expression2". "String_expression3" specifies the format elements, such as currency information. translate ( string_expression1 , string_expression2 , string_expression3 ) Returns "string_expression1" with all occurrences of each character in "string_expression2" replaced by the corresponding character in "string_expression3". trunc ( date_expression , string_expression ) Truncates "date_expression" using the format specified by "string_expression". For example, if "string_expression" is 'year', then "date_expression" is truncated to the first day of the year. Example: trunc ( 2003-08-22 , 'year' ) Result: Returns 2003-01-01. trunc ( numeric_expression1 , numeric_expression2 ) Truncates digits from "numeric_expression1" using "numeric_expression2" as the precision.
Exasol Math log ( numeric_expression1 , numeric_expression2 ) Returns the logarithm of "numeric_expression2" with base "numeric_expression1". log2 ( numeric_expression1 ) Returns the logarithm of "numeric_expression1" with base 2. log10 ( numeric_expression1 ) Returns the logarithm of "numeric_expression1" with base 10.
Exasol Trigonometry acos ( numeric_expression ) Returns the arccosine of "numeric_expression" in radians. The arccosine is the angle whose cosine is "numeric_expression". asin ( numeric_expression ) Returns the arcsine of "numeric_expression" in radians. The arcsine is the angle whose sine is "numeric_expression". atan ( numeric_expression ) Returns the arctangent of "numeric_expression" in radians. The arctangent is the angle whose tangent is "numeric_expression". atan2 ( numeric_expression1 ,numeric_expression2 ) Returns the arctangent of the x and y coordinates specified by "numeric_expression1" and "numeric_expression2", respectively, in radians. The arctangent is the angle whose tangent is "numeric_expression2" / "numeric_expression1". cos ( numeric_expression ) Returns the cosine of "numeric_expression" where "numeric_expression" is an angle expressed in radians. cosh ( numeric_expression ) Returns the hyperbolic cosine of "numeric_expression" where "numeric_expression" is an angle expressed in radians. sin ( numeric_expression ) Returns the sine of "numeric_expression" where "numeric_expression" is an angle expressed in radians. sinh ( numeric_expression ) Returns the hyperbolic sine of "numeric_expression" where "numeric_expression" is an angle expressed in radians. tan ( numeric_expression ) Returns the tangent of "numeric_expression" where "numeric_expression" is an angle expressed in radians. tanh ( numeric_expression ) Returns the hyperbolic tangent of "numeric_expression" where "numeric_expression" is an angle expressed in radians.