title: How to convert BLOB to varchar with SAP HANA database using SQL
body: <p>how do I cast a blob to varchar with SAP HANA database using SQL.</p>
  
  <p>(we need the column to be stored in blob - not TEXT - in else HANA automatically creates an index on this column. But we need an index with full-text-search and CORE_EXTRACTION)</p>
  
  <p>The following code</p>
  
  <pre><code>select 
  cast("DESCRIPTION" as varchar) "D"
  from "DESC"
  </code></pre>
  
  <p>returns </p>
  
  <pre><code>Could not execute 'select cast("DESCRIPTION" as varchar) "D" from "DESC"' in 30 ms 168 µs . 
  SAP DBTech JDBC: [266]: inconsistent datatype:  
  </code></pre>