Home » Server Options » Text & interMedia » How to create store procedure using Oracle Text [CONTAINS]?
How to create store procedure using Oracle Text [CONTAINS]? [message #147243] Wed, 16 November 2005 11:08 Go to next message
herry.roby
Messages: 10
Registered: September 2005
Junior Member
Hi All..

Does anyone know how to create store procedure that can searching text on some document using CONTAINS type? such statement that code below showed.

SELECT score(1), id, title FROM library t
WHERE CONTAINS(t.document.source.localdata,'oracle',1)> 0;


I try this, but it not worked.

PROCEDURE SEARCHING ( new_SEARCH IN VARCHAR2 )
IS
v_id NUMBER;
v_title VARCHAR2(100);
BEGIN

SELECT t.id, t.title INTO v_id, v_title
FROM library t WHERE CONTAINS(t.document.source.localdata,new_SEARCH)> 0;

PRINT_PAGE_HEADER;
htp.print( '<table border="0" width="100%" cellspacing="0" align="center">' );
htp.print( '<tr>' );
htp.print( '<td headers="id">' || v_id || '</td>' );
htp.print( '<td headers="title">' || v_title || '</td>' );
htp.print( '</tr></table>' );
PRINT_PAGE_TRAILER( TRUE );

END SEARCHING;

When compiled, the procedure show no error. But when it called it return HTTP 404 NOT FOUND.
Re: How to create store procedure using Oracle Text [CONTAINS]? [message #147249 is a reply to message #147243] Wed, 16 November 2005 16:06 Go to previous message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Try the same code, but instead of using http, use dbms_output, to eliminate the web server factor as a complication.
Previous Topic: Information Technology Thesaurus Needed
Next Topic: Storing reserved ( special ) word as tokens in Oracle Text Index.
Goto Forum:
  


Current Time: Fri Mar 29 02:56:39 CDT 2024