Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Bind Variables and Intermedia Text CTXSYS with CONTAINS?
Hi Folks,
I'm using 8.1.7 and ctxsys Intermedia queries using the CONTAINS key word.
e.g.
procedure pr_artists_by_match_string(search_string_in varchar2,
artists_cursor in out ref_cur) is
v_sql varchar2(4000);
begin
v_sql := 'SELECT art_id, art_name, art_picture_count, null rla_description,
art_name_clean, score(1) score_1 FROM artists WHERE CONTAINS
((art_match_string), '''||fn_imt_fuzzy_and(search_string_in)||''',1) >0
order by score_1 desc, art_name asc';
open artists_cursor for v_sql;
end pr_artists_by_match_string;
The queries work fine, but I'm wondering if they're being shared
efficiently.
Do I need to replace '''||fn_imt_fuzzy_and(search_string_in)||''' with a
bind variable?
I normaly do use bind variables e.g.
procedure pr_artists_by_art_id(art_id_in varchar2, artists_cursor in out
ref_cur) is
v_sql varchar2(500);
begin
v_sql := 'select art_id, art_name, art_picture_count, null rla_description,
art_name_clean from artists where art_id = :1';
open artists_cursor for v_sql using art_id_in;
end pr_artists_by_art_id;
Any advice much appreciated.
Simon. Received on Wed Nov 14 2001 - 08:28:43 CST