You are here: Functions > ASCII()

ASCII()

ASCII() returns the UNICODE decimal value of the first character of a specified character expression or character field. This function is the inverse of the CHR() function.

Use ASCII() to test character field values when they are not printable characters, such as tabs.

Function Format

ASCII(C)

ASCII() analyzes the first character in the character expression C and returns a decimal number representing the value.

Ensure that C is enclosed in quotes if it is a constant.

Examples

ASCII("A") = 65

ASCII("1") = 49

To extract records that have a tab character (decimal value = 9) at the start of field DESC, specify the condition:

ASCII(DESC) = 9