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