Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using ConText contains() in subquery
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