I am running a query on user_views. The "TEXT" column is of LONG datatype. So, when I use this column in where clause, I am getting error which is expected.
Error: ORA-00932: inconsistent datatypes: expected NUMBER got LONG
And the query is
SELECT view_name, text
FROM user_views
WHERE lower(text) LIKE '%company%'
How to solve this?
Best Answer
Because TO_CLOB(LONG) converter/constructor needs physical pointer for storage (potentially 4GB...),
This should work for you (tested on 11gR2):