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

Home -> Community -> Mailing Lists -> Oracle-L -> sql%found problem

sql%found problem

From: paul <pjohnpeter_at_qssnet.com>
Date: Mon, 17 Jul 2000 17:37:51 -0500
Message-Id: <10561.112225@fatcity.com>


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;

it displays only "yes'' even though the table contins or not contain = any rows.
could u tellme what went wrong.
paul
                                              =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>&nbsp;&nbsp; i&nbsp; 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>&nbsp;select count(name) into =
v=20
from&nbsp; str;<BR>&nbsp;if sql%found then<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20 dbms_output.put_line('yes '||v);<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20 else<BR>&nbsp;&nbsp;&nbsp;&nbsp; dbms_output.put_line('no=20 '||v);<BR>&nbsp;&nbsp;&nbsp;&nbsp; end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20 end;</DIV>
<DIV>it displays only&nbsp;&nbsp; &quot;yes'' even though the table =
contins or=20
not contain any rows.</DIV>
<DIV>could u&nbsp; tellme what went wrong.</DIV>
<DIV>paul</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3D""=20

size=3D3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</FONT></DIV></BODY></HTML>
Received on Mon Jul 17 2000 - 17:37:51 CDT

Original text of this message

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