contains query [message #287331] |
Tue, 11 December 2007 23:49 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
subhadip.chanda
Messages: 64 Registered: May 2007
|
Member |
|
|
Hii,
I want to get such objects from the data dictionary user_objects such that object_name contain the word 'API'.I used to write the query such that -->
SELECT T.OBJECT_NAME FROM USER_OBJECTS T WHERE CONTAINS(T.OBJECT_NAME,'API')>0;
But it raised error massage --> ORA-00904: "CONTAINS": invalid identifier
Please give the solution and tell me how to used contains in select query.
|
|
|
Re: contains query [message #287341 is a reply to message #287331] |
Wed, 12 December 2007 00:40 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/43710.gif) |
Barbara Boehmer
Messages: 9104 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
In order to use the contains operator, you must have created a context index on the table that you are querying. However, such an index cannot be created on a view and you should avoid creating such things on data dictionary views such as user_objects. This is not an appropriate use for contains. You should just use LIKE.
|
|
|