# 22. Virtuoso Functions Guide - ascii

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
ascii
atoi
blob_to_string
blob_to_string_outpu...
chr
initcap
isblob
isstring
lcase
left
length
locate
ltrim
make_string
regexp_instr
regexp_like
regexp_match
regexp_parse
regexp_replace
regexp_substr
repeat
replace
right
rtrim
search_excerpt
serialize
space
split_and_decode
sprintf
strcasestr
strchr
string_output
string_output_flush
string_output_gz_com...
string_output_string
string_to_file
strrchr
strstr
subseq
substring
tmp_file_name
trim
ucase
upper
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## ascii

Get ASCII value of a character
integerascii ( arg any);
Description

ascii returns the ASCII value of the first character of a string. If an empty string is given, then zero is returned.

Parameters
arg – A string
Return Values

The integer ASCII value of the first character of the input string is returned. If the input string is empty, then zero is returned

Errors

SQLState | Error Code | Error Text | Description
--- | --- | --- | ---
22023 | SR044 | Function ascii needs a string as an argument, not an argument of type %d (= %s) |

Examples
Simple example

    SQL> select ascii('Zardoz');
    callret
    INTEGER
    _______________________________________________________________________________

    90

    1 Rows. -- 14 msec.

See Also

aref, chr