Home » Developer & Programmer » Forms » Cursor (Developer 6I Database 10g window xp)
Cursor [message #408120] Sun, 14 June 2009 07:59 Go to next message
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 Go to previous message
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.
Previous Topic: Show Another Canvas and Hide (Error)
Next Topic: HOST COMMAND
Goto Forum:
  


Current Time: Thu Feb 13 08:52:02 CST 2025