title: SQL convert string data in hexadecimal format into string text
body: <p>I have a table which has a column X. X will be storing large text values in hex format. Now I want to convert hex to raw and validate the data. But when I am using the below query,
  I am getting only some part of text after running the query not the complete text. Actually original text is very large....</p>
  
  <pre><code>select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW(X)) as a from table name 
  </code></pre>
  
  <p>I also tried the below query, but no use it also extracts the same</p>
  
  <pre><code>decalre @a varchar(max)
  select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW(X)) as new  from table name.
  </code></pre>
  
  <p>Kindly let me know how can i extract or see large text from sql. Sample query may be helpful.</p>