Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CLOB in select?
In article <9oa766$r0s$00$1_at_news.t-online.com>, "Michael says...
>
>Hi,
>
>i am having a table, where long text is stored in a CLOB-field. When i am
>sending the query like:
>
>select * from Scott.TEST WHERE xml_doc LIKE 'test' ;
>
>i am getting the error ORA-00932.
>The oracle-reference is describing, that LONG-datatypes cannot be used in
>the where-clause. Is it the same with CLOB-datatype?
>
>Thanks in advance, Michael
>
>
>
>
In 8i and before, you cannot do that. You would have to
select * from scott.test where dbms_lob.instr( xml_doc, 'test' ) > 0;
In 9i, you can use LIKE on a clob.
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Wed Sep 19 2001 - 10:01:08 CDT