0

I'm trying to read BLOB data from messages table form WhatsApp database called msgstore, I want to get the file names that are transferred. The blob data is stored in thumb_image column.

I found this query here:

SELECT dbms_lob.substr(thumb_image)
FROM messages 
WHERE _id = 3;

I also tried this query from here:

SELECT utl_raw.cast_to_varchar2(dbms_lob.substr(thumb_image)) 
FROM messages  
WHERE _id = '3;

I both cases I keep getting an error thats says:

Error while executing sql query on database 'msgstore': near "(" syntax error.

I don't understand what's wrong with the query. How can I fix this?

3
  • 1
    The queries you posted work for Oracle and not SQLite. Commented Mar 12, 2020 at 8:39
  • @forpas do you know if there's something similar to that that might work in SQLite? Commented Mar 12, 2020 at 8:43
  • Use SQLite's substr(): substr(thumb_image, 1, 100) Commented Mar 12, 2020 at 8:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.