Solved

Oracle8 - LIKE OPERATOR ON CLOB

Posted on 2003-12-06
4
3,854 Views
Last Modified: 2008-02-01
In Oracle 9 I could use the LIKE operator on CLOB objects, but it doesn't seems to work in Oracle 8.

Is there an alternative way to do it in Oracle 8 ?

example: select * from article where bodyText LIKE '%TEST%'

Batalf
0
Comment
Question by:Batalf
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:seazodiac
ID: 9888420
that's right, in Oracle8i you have to use dbms_lob package.


SQL> SELECT * FROM A WHERE dbms_lob.instr(<column>,'<search_string>',1,1)>0;

hope this helps




0
 
LVL 32

Author Comment

by:Batalf
ID: 9888436
That helped a lot. Could you make it case-INsensitive too?
0
 
LVL 23

Accepted Solution

by:
seazodiac earned 250 total points
ID: 9888472
I guess you can do it by adding another layer of function like upper() or lower() like this:

SELECT * FROM A WHERE dbms_lob.instr(upper(<column>),upper('<search_string>'),1,1)>0;
0
 
LVL 32

Author Comment

by:Batalf
ID: 9888495
Off course :-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question