Home » SQL & PL/SQL » SQL & PL/SQL » SQL%NOTFOUND
SQL%NOTFOUND [message #37341] Thu, 31 January 2002 21:20 Go to next message
diaz
Messages: 58
Registered: October 2001
Member
hello..

i have a code like this

declare
cursor c is select * from payment where id='5';
begin
if c%found then
dbms_output.put_line ('Found');
else
dbms_output.put_line ('Not Foud');
end

but.. it didn't work if the id is not found..
if it is found it'll print the result..

can you tell me what's wrong with the code..
please..
Re: SQL%NOTFOUND [message #37343 is a reply to message #37341] Fri, 01 February 2002 00:47 Go to previous message
ramu
Messages: 82
Registered: February 2001
Member
please open the cursor and fetch the value then it would work fine.

open cursor
fetch cursor into memory variables
now u can use the cursor attributes
close cursor
Previous Topic: how to write this select statement
Next Topic: PLS-00103: Encountered !!!!!!!!!!
Goto Forum:
  


Current Time: Wed Apr 24 11:53:23 CDT 2024