• string_exp can be the name of a column, a string literal, or the result of another scalar function, where the underlying data type is SQL_CHAR, SQL_VARCHAR, or SQL_LONGVARCHAR.
• start, length, and count can be the result of another scalar function or a literal numeric value, where the underlying data type is SQL_TINYINT, SQL_SMALLINT, or SQL_INTEGER.
Table 6. Scalar String Functions ASCII(string_exp) ASCII code value of the leftmost character of string_exp as an integer. BIT_LENGTH(string_exp) CHAR(code) The character with the ASCII code value specified by code. code should be between 0 and 255; otherwise, the return value is data-source dependent. CHAR_LENGTH(string_exp) The string resulting from concatenating string_exp2 and string_exp1. The string is system dependent. An integer value that indicates the difference between the values returned by the SOUNDEX function for string_exp1 and string_exp2. A string where length characters have been deleted from string_exp1 beginning at start and where string_exp2 has been inserted into string_exp beginning at start. LCASE(string_exp) Uppercase characters in string_exp converted to lowercase. LENGTH(string_exp) The number of characters in string_exp, excluding trailing blanks and the string termination character. The starting position of the first occurrence of string_exp1 within string_exp2. If start is not specified, the search begins with the first character position in string_exp2. If start is specified, the search begins with the character position indicated by the value of start. The first character position in string_exp2 is indicated by the value 1. If string_exp1 is not found, 0 is returned. LTRIM(string_exp) The characters of string_exp with leading blanks removed. OCTET_LENGTH(string_exp) REPEAT(string_exp, count) RTRIM(string_exp) The characters of string_exp with trailing blanks removed. SOUNDEX(string_exp) SPACE(count) A string consisting of count spaces. UCASE(string_exp) Lowercase characters in string_exp converted to uppercase.
![]() |
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |