Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Context and Cursors

Re: Context and Cursors

From: <calistab_at_my-deja.com>
Date: Mon, 19 Jul 1999 14:49:06 GMT
Message-ID: <7mvdsu$u12$1@nnrp1.deja.com>


Sorry, I'll try to be more clear, thanks for trying to help.

I've got a list of keywords and I want to use a Context query to search a list of URL's for them. What I had been doing previously was searching the keywords one at a time, but now I'm trying to search automatically all at once using a cursor that contains the keywords and looping. It looks like this:

procedure it_urlsearch IS

  CURSOR itkeywords_cur IS

      SELECT keyword from dbcodes where rtrim(SUBCLASS)='Automatic Data Processing and Telecommunication Services' or rtrim(SUBCLASS)='General-Purpose Automated Data Processing Equipment (Including Firmware), Software, Supplies, and Support Equipment';

  CURSOR url_temp_cur IS

      SELECT textkey from url_ctx;

   tempkey varchar(50);
   url_temp number;
   ok boolean;

begin

htp.htmlOpen;
htp.headOpen;
htp.title('ITBids | URLs');
htp.headClose;
htp.bodyOpen;

OPEN itkeywords_cur;
	LOOP
  FETCH itkeywords_cur into tempkey;
	EXIT WHEN itkeywords_cur%NOTFOUND;

  ctx_query.contains('BG_MAIN_POL',tempkey,'url_ctx');**

OPEN url_temp_cur;

        LOOP
  FETCH url_temp_cur into url_temp;
EXIT WHEN url_temp_cur%NOTFOUND;
  INSERT INTO iturls values(url_temp);

        END LOOP;
CLOSE url_temp_cur;

        END LOOP;
CLOSE itkeywords_cur;

Again, thanks for your help.
Calista

In article <7mujtc$lqd$1_at_nnrp1.deja.com>,   bonanos_at_yahoo.com wrote:
> Hi Calista
>
> > Hi,
> > Is this even possible? I'm trying to feed a cursor into a Context
> > query, but it's failing... possibly because Context doesn't run
quick
> > enough? I don't know, just guessing.
> >
> > Any advice, help with this would be greatly appreciated.
> > Thanks.
> > Calista Bailey
>
> Could you please ask the question again, don't understand what you
mean?
> what are you trying to do and what error meassage etc.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jul 19 1999 - 09:49:06 CDT

Original text of this message

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