DBYTE( ) function

Returns the Unicode character located at the specified byte position in a record.

Note

This function is specific to the Unicode edition of Analytics. It is not a supported function in the non-Unicode edition.

Syntax

DBYTE(byte_location)

Parameters

Name Type Description
byte_location numeric

The byte position to return as a character value.

To return a meaningful value, you must specify the starting point of the double-byte character, which means that you should only specify odd numbers in the byte_location parameter.

Output

Character.

Examples

Basic examples

The examples illustrate the behavior of the function when applied to the following Unicode value, which contains 11 characters (22 bytes) 美丽 10072DOE:

Returns "丽":

DBYTE(3)

Returns "D":

DBYTE(17)

Returns "E":

DBYTE(21)

Remarks

When to use DBYTE( )

Use DBYTE( ) to examine the contents of a position in a record, without having to define a field for this purpose.