How to create store procedure using Oracle Text [CONTAINS]? [message #147243] |
Wed, 16 November 2005 11:08 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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.
|
|
|
|