DB2 Scalar functions - String scalar functions - www.cadcobol.com.br


Volta ao Menu das scalar functions Volta ao Menu Principal

Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

DB2 Scalar functions - String scalar functions
Function Description
ASCII Returns the ASCII code value of the leftmost character of the argument as an integer.
BTRIM Removes characters from the beginning and end of a string expression.
CHARACTER_LENGTH Returns the length of an expression in the specified string-unit.
CHR Returns the character that has the ASCII code value specified by the argument.
COLLATION_KEY Returns a VARBINARY string representing the collation key of the specified string-expression in the specified collation-name.
COLLATION_KEY_BIT Returns a VARCHAR FOR BIT DATA string representing the collation key of the specified string-expression in the specified collation-name.
CONCAT Returns a string that is the concatenation of two strings.
DECRYPT_BIN and DECRYPT_CHAR Returns a value that is the result of decrypting encrypted data using a password string.
DIFFERENCE Returns the difference between the sounds of the words in two argument strings, as determined by the SOUNDEX function.
A value of 4 means the strings sound the same.
ENCRYPT Returns a value that is the result of encrypting a data string expression.
GENERATE_UNIQUE Returns a bit data character string that is unique compared to any other execution of the same function.
GETHINT Returns the password hint if one is found.
INITCAP Returns a string with the first character of each word converted to uppercase and the rest to lowercase.
INSERT Returns a string, where argument3 bytes have been deleted from argument1 (beginning at argument2), and argument4 has been inserted into argument1 (beginning at argument2).
INSTR Returns the starting position of a string within another string.
INSTRB Returns the starting position, in bytes, of a string within another string.
LCASE Returns a string in which all the SBCS characters have been converted to lowercase characters.
LCASE (locale sensitive) Returns a string in which all characters have been converted to lowercase characters using the rules from the Unicode standard associated with the specified locale.
LCASE (SYSFUN schema) Returns a string in which all the SBCS characters have been converted to lowercase characters.
LOWER (locale sensitive) Returns a string in which all characters have been converted to lowercase characters using the rules from the Unicode standard associated with the specified locale.
LEFT Returns the leftmost characters from a string.
LOCATE Returns the starting position of one string within another string.
LOCATE_IN_STRING Returns the starting position of the first occurrence of one string within another string.
LOWER Returns a string in which all the characters have been converted to lowercase characters.
LPAD Returns a string that is padded on the left with the specified character, or with blanks.
LTRIM Removes blanks from the beginning of a string expression.
LTRIM (SYSFUN schema) Removes blanks from the beginning of a string expression.
OCTET_LENGTH Returns the length of an expression in octets (bytes).
OVERLAY Returns a string in which, beginning at start in the specified source-string, length of the specified code units have been deleted and insert-string has been inserted.
POSITION Returns the starting position of argument2 within argument1.
POSSTR Returns the starting position of one string within another string.
REPEAT Returns a character string composed of the first argument repeated the number of times specified by the second argument.
REPEAT (SYSFUN schema) Returns a character string composed of the first argument repeated the number of times specified by the second argument.
REPLACE Replaces all occurrences of argument2 in argument1 with argument3.
REPLACE (SYSFUN schema) Replaces all occurrences of expres sion2 in expression1 with e xpression3.
RIGHT Returns the rightmost characters from a string.
RPAD Returns a string that is padded on the right with the specified character, string, or with blanks.
RTRIM Removes blanks from the end of a string expression.
RTRIM (SYSFUN schema) Removes blanks from the end of a string expression.
SOUNDEX Returns a 4-character code representing the sound of the words in the argument.
This result can be compared with the sound of other strings.
SPACE Returns a character string that consists of a specified number of blanks.
STRIP Removes blanks or another specified character from the end, the beginning, or both ends of a string expression.
STRLEFT Returns the leftmost string of string-expression of length length, expressed in the specified string unit.
STRPOS Returns the starting position of one string within another string.
STRRIGHT Returns the rightmost string of string-expression of length length, expressed in the specified string unit.
SUBSTR Returns a substring of a string.
SUBSTRB Returns a substring of a string.
SUBSTRING Returns a substring of a string.
TO_SINGLE_BYTE Returns a string in which multi-byte characters are converted to the equivalent single-byte character where an equivalent character exists.
TRANSLATE Returns a string in which one or more characters in a string are converted to other characters.
TRIM Removes blanks or another specified character from the end, the beginning, or both ends of a string expression.
UCASE The UCASE function is identical to the TRANSLATE function except that only the first argument (char-string-exp) is specified.
UCASE (locale sensitive) Returns a string in which all characters have been converted to uppercase characters using the rules from the Unicode standard associated with the specified locale.
UPPER Returns a string in which all the characters have been converted to uppercase characters.
UPPER (locale sensitive) Returns a string in which all characters have been converted to uppercase characters using the rules from the Unicode standard associated with the specified locale.


© Copyright IBM Corp.