Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> sql%found problem
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01BFF015.BB654960 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hi all,
i had a problem over this query.could u tell me what is wrong in =
that query.
=3D=3D=3D=3D=3D=3D=3D=3D
declare
v number(10);
begin
select count(name) into v from str;
if sql%found then
dbms_output.put_line('yes '||v); else dbms_output.put_line('no '||v); end if; end;
=20
------=_NextPart_000_0011_01BFF015.BB654960 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000><FONT size=3D3>hi all,</FONT></FONT><FONT=20
size=3D3></FONT></DIV>
<DIV><FONT color=3D#000000><FONT size=3D3> i had a =
problem over=20
this query.could u tell me what is wrong in that =
query.</FONT></FONT></DIV>
<DIV><FONT color=3D#000000><FONT =
size=3D3></FONT></FONT>=3D=3D=3D=3D=3D=3D=3D=3D</DIV>
<DIV>declare<BR>v number(10);<BR>begin<BR> select count(name) into =
v=20
from str;<BR> if sql%found then<BR> =20
dbms_output.put_line('yes '||v);<BR> =20
else<BR> dbms_output.put_line('no=20
'||v);<BR> end if;<BR> =20
end;</DIV>
<DIV>it displays only "yes'' even though the table =
contins or=20
not contain any rows.</DIV>
<DIV>could u tellme what went wrong.</DIV>
<DIV>paul</DIV>
<DIV> </DIV>
<DIV><FONT color=3D#000000 face=3D""=20
size=3D3> &nbs= p;  = ; = =20