title: Error while executing sql query on database
body: <p>I'm trying to read BLOB data from <code>messages</code> table form WhatsApp database called <code>msgstore</code>, I want to get the file names that are transferred. The blob data is stored in <code>thumb_image</code> column.</p>
  
  <p>I found this query <a href="https://stackoverflow.com/a/27618946">here</a>:</p>
  
  <pre><code>SELECT dbms_lob.substr(thumb_image)
  FROM messages 
  WHERE _id = 3;
  </code></pre>
  
  <p>I also tried this query from <a href="https://stackoverflow.com/a/828834">here</a>:</p>
  
  <pre><code>SELECT utl_raw.cast_to_varchar2(dbms_lob.substr(thumb_image)) 
  FROM messages  
  WHERE _id = '3;
  </code></pre>
  
  <p>I both cases I keep getting an error thats says:</p>
  
  <pre><code>Error while executing sql query on database 'msgstore': near "(" syntax error.
  </code></pre>
  
  <p>I don't understand what's wrong with the query. 
  How can I fix this?</p>