Oracle PL/SQL - ASCIISTR Function

ASCIISTR Function : 

Syntax : ASCIISTR ('input_string')

  • In Oracle PL/SQL ASCIISTR function takes a string (or an expression that resolves to a string) and returns an ASCII version of the string in the current database character set.
  • Non ASCII Characters are converted to the form \xxxx (in the below example \00C4) where \xxxx represents the UTF-16 code.
  • ASCIISTR is useful in converting the Unicode characters to a ASCII set value.

Example: 

SELECT ASCIISTR('XYZÄABC') FROM DUAL;

ASCIISTR
----------
XYZ\00C4ABC