Tuesday, August 18, 2015

Search a String inside BLOB column of Table in SQL

To search a particular sting in the BLOB contents, we can use the below SQL statement.

Syntax:
select * from Table_name
where  dbms_lob.instr(Column_name, utl_raw.CAST_TO_RAW('SearchString'), 1, 1) > 0 ;

Example
select * from mds_streamed_docs
where  dbms_lob.instr(sd_contents, utl_raw.CAST_TO_RAW('Siebel'), 1, 1) > 0 ;

No comments:

Post a Comment