Home » Developer & Programmer » Forms » Urgent: problem in if-else statment.
icon2.gif  Urgent: problem in if-else statment. [message #210111] Tue, 19 December 2006 07:37 Go to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

hi all ,
i have a problem,is
i have a table LDR_INFO(ldr varchar2(15) primary key ,yr date,counts number).ok

i simple insert values in thsi table and want to check before new entry
if the values of 'counts' reach to 20 then show an alert.

but

Quote:
procedure ldr is

v_count number:=1;


begin
insert into ldr_info values (:ldr,:yr,v_count);

elsIF V_COUNT=20 THEN -- i want to check ,is counts field of ldr_info reached to 20.



V_COUNT:=SHOW_ALERT('ALERT1') ;

ELSE


UPDATE LEADER_INFO SET COUNTs =counts+1 ;
STANDARD.COMMIT;

END IF;

end if;

end;


problem is when i put statment as .

elseif counts=20 then --- error (counts my be declare ).
or
elseif max(counts)= 20 then --- max function allowed in select only.


so how can i perform this check .i know there is a very small point in above .but now at this time i m fed-up ,so u plz help me kindlly.

regrads.
Re: Urgent: problem in if-else statment. [message #210123 is a reply to message #210111] Tue, 19 December 2006 08:41 Go to previous messageGo to next message
rameshuddaraju
Messages: 69
Registered: June 2005
Location: India
Member


V_COUNT:=SHOW_ALERT('ALERT1') ;



your problem seems may be related to forms

take a global variable then increment it when ever you perform an insert then check it's count.
if it reaches 20 then show alert.




Re: Urgent: problem in if-else statment. [message #210155 is a reply to message #210111] Tue, 19 December 2006 12:34 Go to previous messageGo to next message
joy_division
Messages: 4643
Registered: February 2005
Location: East Coast USA
Senior Member
Please stop using URGENT in all of your questions. I for one will not answer any question that uses urgent in the subject. We really don't care that you did not do the appropriate research in advance of your deadlines.
Re: Urgent: problem in if-else statment. [message #210157 is a reply to message #210111] Tue, 19 December 2006 12:55 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
The lack of planning on your part does NOT constitute an emergency on our part.
With free advice you get what you paid for it!
Re: Urgent: problem in if-else statment. [message #210254 is a reply to message #210157] Wed, 20 December 2006 01:04 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Moved to Forms.

MHE
Previous Topic: Why Modal window closes?
Next Topic: ORA-106556 (Word Viewer cannot open the document ...)
Goto Forum:
  


Current Time: Thu Dec 08 16:31:21 CST 2016

Total time taken to generate the page: 0.11416 seconds