search in long datatype column
436410Mar 7 2005 — edited Mar 8 2005Hi,
as the subject suggests, I have a long datatype column in my table, and I wanna do a search in this column, I used this select statement and I get an error:
SELECT * FROM MYTABLE WHERE UPPER(MY_LONG_COLUMN) LIKE UPPER('%my_search_word%');
and this is the error I get:
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG
So I read a bit on the internet and found that I could do the search in the first 2000 characters of my column by converting it to a varchar2 by using substr, but I get the same error (ORA-00932) with the following statement:
SELECT * FROM MYTABLE WHERE UPPER(SUBSTR(MY_LONG_COLUMN, 1, 2000)) LIKE UPPER('%my_search_word%');
Any suggestions??
Thanks,
Mike