Cursor [message #408120] |
Sun, 14 June 2009 07:59  |
shahzaib_4vip@hotmail.com
Messages: 410 Registered: December 2008 Location: karachi
|
Senior Member |
|
|
Hellow All
I want to execute all record where item_name will give in text_item8 i write this query but its not work
Declare
Purchase_item_name varchar2(50);
Cursor ABC
is select Purchase_item_name from purchase2 where
item_no_pur=:text_item8;
Begin
Open ABC;
Loop
Exit when abc% notfound;
Fetch ABC into :item_no_pur;
End loop;
Close ABC;
END;
Regards
Shahzaib
|
|
|
Re: Cursor [message #408163 is a reply to message #408120] |
Mon, 15 June 2009 00:16  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
FETCH first, then check whether there is something there or not.
Move to the NEXT RECORD unless you want to overwrite new values all over again in the same record.
Also, try to be more descriptive next time. "Its not work" is useless.
|
|
|