title: How to compare single byte and multi bytes string?
body: <p>I have two strings, one is input from client and other is data in table. Two strings seem to be the same, but has different hex value when I try <code>CAST_TO_RAW</code>.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT UTL_RAW.CAST_TO_VARCHAR2('3539352F47502D0A41544258484E') INPUT,
         UTL_RAW.CAST_TO_NVARCHAR2('003500390035002F00470050002D000D000A00410054004200580048004E') DTA
    FROM DUAL;
  /*input and data seem same*/
  </code></pre>
  
  <p>Consider that two string is the same. How I pass this case and compare them in query like this:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT A.DATA,
         A.ORTHER_COL
    FROM MYTABLE A
   WHERE A.DATA = INPUT;
  </code></pre>
  
  <p>I tried <code>TO_SINGLE_BYTE</code> but it not work (because of its different <code>LENGTHB</code>):</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT *
    FROM DUAL
   WHERE TO_SINGLE_BYTE(UTL_RAW.CAST_TO_VARCHAR2('3539352F47502D0A41544258484E')) =
         TO_SINGLE_BYTE(UTL_RAW.CAST_TO_NVARCHAR2('003500390035002F00470050002D000D000A00410054004200580048004E'));
  /*return null*/
  </code></pre>