SQL Reference

Functions

LENGTH

The processing of this function is no different for mixed character strings in an EUC environment. The value returned is the length of the string in the code page of the argument. When using this function to determine the length of a value, careful consideration should be given to how the length is used. This is especially true for mixed string constants since the length is given in bytes, not characters. For example, the length of a mixed string column in a DBCS database returned by the LENGTH function may be less than the length of the retrieved value of that column on an eucJP or eucTW client due to the conversion of some DBCS characters to multi-byte eucJP or eucTW characters.

SUBSTR

The SUBSTR function operates on mixed character strings on a byte basis. The resulting string may therefore include fragments of multi-byte characters at the beginning or end of the resulting string. No processing is provided to detect or process fragments of characters.

TRANSLATE

The TRANSLATE function supports mixed character strings including multi-byte characters. The corresponding characters of the to-string-exp and the from-string-exp must have the same number of bytes and cannot end with part of a multi-byte character.

The pad-char-exp must result in a single-byte character when the char-string-exp is a character string. Since TRANSLATE is performed in the code page of the char-string-exp, the pad-char-exp may be converted from a multi-byte character to a single-byte character.

A char-string-exp that ends with part of a multi-byte character will not have those bytes translated.

VARGRAPHIC

The VARGRAPHIC function on a character string operand in a Japanese or Traditional-Chinese EUC code page returns a graphic string in the UCS-2 code page.


[ Top of Page | Previous Page | Next Page ]