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

Home -> Community -> Mailing Lists -> Oracle-L -> Hash Tables and PL/SQL (Ora 9.2)

Hash Tables and PL/SQL (Ora 9.2)

From: mkb <mkb125_at_yahoo.com>
Date: Wed, 11 Jun 2003 08:16:24 -0700
Message-ID: <F001.005AF17F.20030611072922@fatcity.com>


I've been trying to create a hash table using PL/SQL but I seem to be running into some trouble. Hoping someone can point me in the right direction. I've been using PL/SQL Users Guide and Reference Ch 5 as a guide.

I have the following piece of code:

declare

   cursor c1_cur is
   select * from load_tab;

   type rdt_rec_type is table of varchar2(30) index by varchar2(30);

   rdt_type rdt_rec_type;

begin

   open c1_cur;
   loop

      fetch c1_cur into c1_rec;
      exit when c1_cur%notfound;

      if rdt_type.exists(c1_rec.rdt)
      then
         null;
      else
         rdt_type(ctr) := c1_rec.rdt;
     end if;
    

   end loop;

end;
/

My goal is to have only those values in the hash table
(rdt values) that are not dups. I was hoping that
object.exists(value) would work, but apparently I seem to be getting everything in my hash.

Any ideas how I can code this?

thanks

mohammed



Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: mkb
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed Jun 11 2003 - 10:16:24 CDT

Original text of this message

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