How to: |
The BYTVAL function translates a character to the ASCII or EBCDIC decimal value that represents it, depending on the operating system.
BYTVAL(character, output_format)
where:
Alphanumeric
Is the character to be translated. If you supply more than one character, the function evaluates the first one.
Integer
BYTVAL translates the first character of LAST_NAME into its ASCII decimal value and stores the result in a column with the format I3.
BYTVAL(LAST_NAME,'I3')
For SMITH, the result is 83.
For JONES the result is 74.
iWay Software |