Function documentationCHR(a,n) Locate this document in the navigation structure


CHR(a,n) is a conversion function which converts the expression a into a character string.

Value a: The expression a must be a numeric value, a character string or a Boolean value (BOOLEAN).

Value n: n is an unsigned integer.


a, n

Result of the CHR(a,n) Function

a is a numeric value

Character string that corresponds to the CHAR representation of the numeric value a.

The code attribute of the character string corresponds to the code type of the computer.

a is a character string

Unchanged character string

a is a Boolean value

T, if a=TRUE F, if a=FALSE

a is not a numeric value, a character string, or a Boolean value

Error message

CHR(a,n), n>=1

Output with the length attribute n


The length attribute n is calculated depending on the data type and the length of a

CHR(a) and a is of data type FLOAT(p)

If p=1, then n=6

If p>1, then n=p+6

CHR(a) and a is of data type FIXED(p,s)

If p=s, then n=p+s

If s=0, then n=p+1

a is a NULL value

NULL value

a is a special NULL value

Error message


SQL Tutorial, Converting Values