1 Reply Latest reply on Mar 24, 2015 7:11 PM by rp0428

    How to search inside BLOB



      I need to search inside BLOB segment for specific string.

      I have tried two options , but non of them return row.


      select ...

      from ....

      where dbms_lob.instr(my_blob, utl_raw.cast_to_raw('/PROD-NP-2009Version/Shared/Connections/Database'))>0 


      select ...

      from ....

      where dbms_lob.instr(my_blob, utl_raw.cast_to_raw('/PROD-NP-2009Version/Shared/Connections/Database'),1,1)>0


      I am not sure that the string is exists , but would like to get your advise which option is should use future searches



        • 1. Re: How to search inside BLOB

          Wrong forum!


          This forum is ONLY for Sql Developer questions.


          Please mark your thread ANSWERED and repost it in the Sql and Pl/Sql forum

          SQL & PL/SQL


          BLOBs are OPAQUE - they contain binary data, not strings.


          You need to convert the BLOB to an appropriate datatype (e.g. CLOB) if you want to treat it as a 'string'. Repost in the other forum and you can get further help with your question.