title: convert big varbinary into text field (MSSQLSERVER)
body: <p>I try to fetch a big textcontent (&lt;8000 chars) of a varbinary(max) field as follow:</p>
  
  <pre><code>CAST(varbinary_as_text AS VARCHAR(10000)) AS varbinary_as_text
  </code></pre>
  
  <p>I get the following error due the varchar is limited to 8000 chars:</p>
  
  <pre><code>java.sql.SQLException: The size (10000) given to the type 'varchar' exceeds the maximum allowed for any data type (8000).
  </code></pre>
  
  <p>How to fetch the text (> 8000 chars) content of a varbinary(max) field ?</p>