Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: tables with binary_integer in PL/SQL
Kjetil Skotheim wrote:
>
> How can I easily test if an entry in a table exists?
>
> The following does not work:
>
> declare
> type tt is table of number(10) index by binary_integer;
> brb tt;
> begin
> brb(1023):=234;
> if exist brb(1023) then begin
> logg(to_char(brb(1023))); end;
>
> end;
> /
>
> I could catch exceptions, but prefer to avoid that.
>
> Any ideas?
Try using exception handler. Your (modified) example:
-- =============================================================== ! Jurij Modic Republic of Slovenia ! ! tel: +386 61 178 55 14 Ministry of Finance ! ! fax: +386 61 21 45 84 Zupanciceva 3 ! ! e-mail: jurij.modic_at_mf.sigov.mail.si Ljubljana 1000 ! ===============================================================Received on Mon Jan 06 1997 - 00:00:00 CST