A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: String Functions

ascii()

The String Function ascii() returns the ASCII-Code as a decimal number (0..255) for the first character of the value given in the parameter "char_expression" or "uchar_expression" .

Syntax of the String Function ascii()

    ascii([char_expression | uchar_expression])
    

The parameters of the String Function ascii()

char_expression
The parameter "char_expression" can either be a column name, variable, constant oder expression of one of these datatypes Datentypen char, varchar, nchar or nvarchar .

uchar_expression
The parameter "uchar_expression" can be a column name, variable, constant or expression of one of these datatypes Datentypen unichar or univarchar .

Example for the String Function ascii()

    select ascii("ABC")
go
-----
65

Returns the ASCII-Code 65 (= hex 41).

See also:

ASE T-SQL - Aggregate Functions,
char(),
char(n),
charindex(),
char_length(),
compare(),
difference(),
lower(),
ltrim(),
patindex(),
replicate(),
reverse(),
right(),
rtrim(),
sortkey(),
soundex(),
space(),
str(),
String Functions,
stuff(),
substring(),
to_unichar(),
uhighsurr(),
ulowsurr(),
upper(),
uscalar().