Home » Developer & Programmer » Forms » lov error (9i)
lov error [message #380313] Sat, 10 January 2009 09:52 Go to next message
laith
Messages: 41
Registered: December 2008
Location: U.A.E
Member
I have 2 blocks, first one has text item (term_code) and this one has LOV giving me (200910,200830,200820,200810) and i want to write code in first block(KEY_NXTBLK) so if i chose the max of those number(from lov)..i can do what ever in the next block, but if i chose the others ... i can not do anything ( just query).
i write this code but it's giving me error and i dont think is right one ?? help please .

IF :TERM_CODE = select max (fytrtrm_term_code) from fytrtrm
THEN

SET_BLOCK_PROPERTY('FYTRCAT',INSERT_ALLOWED,PROPERTY_FALSE);
SET_BLOCK_PROPERTY('FYTRCAT',UPDATEABLE ,PROPERTY_FALSE);

ELSE

SET_BLOCK_PROPERTY('FYTRCAT',INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('FYTRCAT',UPDATEABLE ,PROPERTY_TRUE);

END IF;
Re: lov error [message #380324 is a reply to message #380313] Sat, 10 January 2009 14:46 Go to previous messageGo to next message
Littlefoot
Messages: 21821
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
SELECT statement can not be part of the IF-THEN-ELSE statement. You'll have to select value into a variable and use this variable in IF-THEN-ELSE; something like
SELECT max(something) INTO variable FROM ...

IF variable = blabla THEN
   ...
END IF;


By the way: next time you encounter an error, please, tell us which error it is. We usually don't like guessing.
Re: lov error [message #380572 is a reply to message #380313] Mon, 12 January 2009 06:23 Go to previous message
tipyyt
Messages: 11
Registered: March 2007
Location: Karachi
Junior Member

WHAT ERROR you are getting?
[EDITED by DJM: remove superfluous tags]

[Updated on: Mon, 12 January 2009 23:25] by Moderator

Report message to a moderator

Previous Topic: problem with list item
Next Topic: frm-40202 error
Goto Forum:
  


Current Time: Mon Nov 04 12:53:37 CST 2024