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 -> multiple runs with the same ref cursor?

multiple runs with the same ref cursor?

From: <jimi_xyz_at_hotmail.com>
Date: 2 Aug 2005 11:47:37 -0700
Message-ID: <1123008457.477683.288830@g14g2000cwa.googlegroups.com>


Ok iv'e been working on this problem for some time now; and haven't really figured anything out. I need to run my ref cursor multiple times, depending on how many of the check boxes the user selects. Let me example, I have a form which has four check boxes, with a text box. The user can either search in the title, approach, scope, or objective; the user also has the option to search all the fields, three of the fields; basically any combination. Note each field is a column in table projects. My question is, say the user wants to search the scope and the objective, how do I have the cursor save the information from the first search, (scope) and i guess append the second search, (objective), to the ref cursor. If someone can tell me want needs to be done, I would be very apprecitive.

Here is my api..

for i in 1..location_array.Count
LOOP
   out_error_message := out_error_message || '[' || location_array(i) || ']';
END LOOP; OPEN cv
for
'select distinct score(1) score, projectid from project '
|| ' where contains('||location_array(1)||', :b1, 1) > 0 order by score desc ' using word_to_search;


location_array is an array of the columns that the suer wants to search, i thought that this may work but it doesn't i need some type of temp varaible i beleive.


for i in 1..location_array.Count
LOOP
OPEN cv
for
'select distinct score(1) score, projectid from project '
|| ' where contains('||location_array(i)||', :b1, 1) > 0 order by score desc ' using word_to_search;

END LOOP; Thanks any help will do,
Jimmie Received on Tue Aug 02 2005 - 13:47:37 CDT

Original text of this message

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