Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using ConText contains() in subquery

Re: Using ConText contains() in subquery

From: TimKArnold <timkarnold_at_aol.com>
Date: 14 Nov 1999 04:22:37 GMT
Message-ID: <19991113232237.07422.00000887@ng-cf1.aol.com>


From the documentation:

Restrictions
The CONTAINS function can only appear in the WHERE clause of a SELECT statement.

You cannot issue the CONTAINS function in the WHERE clause of an UPDATE, INSERT or DELETE statement.

regards,
Tim

>In the code below, the contains() function call fails with an "invalid
>column" error message. But if you comment out the first line and run
>the select statement as a top-level query, it works perfectly. We're
>building the (much more complicated) select statement dynamically, so
>redoing this as a stored procedure would be awkward. Any ideas?
>
>insert into search_results (catalog_entry_id, score)
>SELECT catalog_entry.catalog_entry_id,
>((score(10) * 5) + (score(30) * 2) + (score(20) * 1))
>FROM catalog_entry
>WHERE
>( contains(catalog_entry.title, 'pigskin', 10) > 0
>or contains(catalog_entry.short_description, 'pigskin', 30) > 0
>or contains(catalog_entry.long_description, 'pigskin', 20) > 0
>)
>
>
>
>
> Marc Schabb
> Foundry
> 410-223-2760 x3016
>
>
Received on Sat Nov 13 1999 - 22:22:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US