SQL ASCII scalar function in DB2 for i SQL

SQL ASCII scalar function in DB2 for i SQL
SQL ASCII scalar function in DB2 for i SQL, sql, db2 for i sql, ibmi db2, sql function, scalar function
SQL ASCII scalar function in DB2 for i SQL

ASCII

The ASCII function returns the decimal value of the leftmost character of the character string/Numeric. Refer the ASCII value from the ASCII table.

ASCII(string-expression)

Return the ASCII value of the character 'B'

SELECT ASCII('B') FROM sysibm.sysdummy1
ASCII ( 'B' )
           66

Return the ASCII value of the numeric 1

SELECT ASCII(1) FROM sysibm.sysdummy1
ASCII ( 1 )
         49

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain