The CHARACTER_LENGTH or CHAR_LENGTH function returns the length of a string expression. See LENGTH for a similar function.
If the argument is a UTF-8 or UTF-16 string, the query cannot contain:
The result of the function is a large integer. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
If expression is a character string or graphic string, the result is the number of characters in the argument (not the number of bytes). A single character is either an SBCS, DBCS, or multiple-byte character. If expression is a binary string, the result is the number of bytes in the argument. The length of strings includes trailing blanks or hexadecimal zeroes. The length of a varying-length string is the actual length, not the maximum length.
SELECT CHARACTER_LENGTH(:ADDRESS) FROM SYSIBM.SYSDUMMY1Returns the value 18.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.