Hi Audrey,
Try this, it will stay in the loop
i := 1;
while i < 10 loop
for j in (select the_name from the_table into myvar where the_id =
i) loop
.
end loop;
end loop;
.
Hope it helps.
Regds,
Catherine
-Or
Have you considered just adding another exception handler:
i := 1;
while i < 10 loop
begin
select the_name from the_table into myvar where the_id = i ;
exception
when others then
null; -> or whatever you want to do;
end;
end loop;
The net effect is the same.
HTH -
Brian
Andrey,
Do some reading on exception handling scope in FM.
This is what you want:
i := 1;
while i < 10 loop
begin
select the_name from the_table into myvar where the_id = i ;
EXCEPTION WHEN NO_DATA_FOUND THEN NULL:
end;
end loop;
Igor Neyman, OCP DBA
[EMAIL PROTECTED]
- Origina
You can always start a new block with its own exception handler
Begin
..
..
Begin
..
Exception when ...
..
End;
End;
-Original Message-
Sent: Thursday, April 04, 2002 1:49 PM
To: Multiple recipients of list ORACLE-L
ps , i meant
i := 1;
whil
) 420-4142
Fax: (780) 420-3854
Email: [EMAIL PROTECTED]
> -Original Message-
> From: Andrey Bronfin [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, April 04, 2002 11:49 AM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: a PL/SQL question - how to catch errors witho
Enclose your statements in another BEGIN/EXCEPTION/END block. Strategic
placement of these blocks will achieve what you are looking for.
Lisa Koivu
Oracle Database TANK
Fairfield Resorts, Inc.
954-935-4117
> -Original Message-
> From: Andrey Bronfin [SMTP:[EMAIL PROTECTED]]
> Sent: Thur
ps , i meant
i := 1;
while i < 10 loop
select the_name from the_table into myvar where the_id = i ;
end loop;
DBAndre
> -Original Message-
> From: Andrey Bronfin
> Sent: Thu, April 04, 2002 9:50 PM
> To: [EMAIL PROTECTED] (E-mail); [EMAIL P