The Salesforce driver supports a number of functions that you may use in expressions, as listed and described in the tables in this section.
Table 10: ABS(d) ACOS(d) ASIN(d) ATAN(d) CEILING(d) COS(d) COT(d) DEGREES(d) EXP(d) FLOOR(d) LOG(d) LOG10(d) RADIANS(d) Returns a random number x bigger or equal to 0.0 and smaller than 1.0. SIGN(d) SIN(d) SQRT(d) TAN(A)
Table 11: ASCII(s) BIT_LENGTH(str) CHAR(c) CHAR_LENGTH(str) HEXTORAW(s1) LCASE(s) LEFT(s,count) Returns the leftmost count of characters of s. If s requires double quoting, use SUBSTRING( ) instead. LENGTH(s) LTRIM(s) OCTET_LENGTH(str) RAWTOHEX(s1) RTRIM(s) SOUNDEX(s) SPACE(count) UCASE(s) Converts s to uppercase. LOWER(s) Converts s to lowercase. UPPER(s) Converts s to uppercase.
Table 12: Returns the count of units of time elapsed from datetime1 to datetime2. The string indicates the unit of time and can have the following values: DAYNAME(date) DAYOFMONTH(date) DAYOFWEEK(date) DAYOFYEAR(date HOUR(time) MINUTE(time) MONTH(date) MONTHNAME(date) QUARTER(date) SECOND(time) WEEK(date) YEAR(date)
Table 13: Returns the ID of the session (connection) on which this function was invoked.
Table 14: If expr is NULL, then value is returned; otherwise the result of expr is returned. See COALESCE(expr1, expr2, ...) in this table for evaluating multiple expressions. Converts term to another data type. Converts term to another data type. If expr1 is not Null, then it is returned; otherwise, expr2 is evaluated and, if not Null, it is returned, and so on. This is an ANSISQL standard system function. When value1 equals value2, then value3 is returned; otherwise, value4 or Null is returned in the absence of ELSE. When expr1 is true, then value1 is returned (optionally repeated for more cases); otherwise value4 or Null is returned in the absence of ELSE. Any of the date and time terms can be extracted from datetime_value. If string_expression1 is a sub-string of string_expression2, then the position of the sub-string, counting from one, is returned; otherwise, 0 is returned. string_expression is returned from the numeric_expression1 starting location. Optionally, numeric_expression2 specifies the length of the substring.
| © 2012 Progress Software Corporation and/or its subsidiaries or affiliates. |