Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why the SQL%ISOPEN return false ???
You probably have to rewrite using a cursor. Also safer since your implicit
cursor could have raised no_data_found exception which you didn't handle.
declare
v_result boolean;
name varchar2(35);
cursor c1 is
select first_name into name from employee where first_name ='TEST';
open c1;
fetch c1 into name
if c1%FOUND then
insert into testing values ('v_result is true'); else
insert into testing values ('v_result is false');
end if;
close c1;
commit;
end;
HTH Mark
yew.poo.choon_at_mbf.com.my wrote in message <7ji8nu$bed$1_at_nnrp1.deja.com>...
>can anyone explain to me whay the follow PL/SQL block return me a
>FALSE value for variable v_result ?
>Thank you
>
>declare
>v_result boolean;
>name varchar2(35);
>begin
>select first_name into name
>from employee
>where first_name ='TEST';
>v_result := SQL%ISOPEN;
>if v_result then
> insert into testing values ('v_result is true');
>else
> insert into testing values ('v_result is false');
>end if;
>commit;
>end;
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Tue Jun 08 1999 - 03:14:37 CDT
![]() |
![]() |