Solution:
I have given here an example:
SQL> select to_lob(t.trigger_body) from dba_triggers t;
select to_lob(t.trigger_body) from dba_triggers t
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got LONG
SQL> CREATE TABLE TMP_TRIGGER
(
TRIGGER_BODY CLOB
);
SQl> insert into TMP_TRIGGER select to_lob(t.trigger_body) from dba_triggers t;
Now you can do search from table TMP_TRIGGER. So I have converted long to CLOB and inserted into a table since it’s not possible to convert it in select statement.