Home » Developer & Programmer » Forms » Error in Validation
Error in Validation [message #224727] Thu, 15 March 2007 04:32 Go to next message
Messages: 36
Registered: February 2006
Hi to All,

I a Form I have 2 Item 'FROM_CODE' and 'TO_CODE'. Both are VARCHAR2(18) with a format
For the Item TO_CODE I have the WHEN-VALIDATE-ITEM trigger:

If (NVL(:TO_CODE,'') < NVL(:FROM_CODE,'')) then
DISPLAY_MSG('Code Error', 'To code muts be > From code') ;
raise form_trigger_failure;
end if;

For example, if From code = '' and To code = '' the trigger work fine.

If From code = '' and in To code NO VALUE, the trigger don't return the error message.

How can resolve this problem ? I hope in Your help. Razz

Best Regards
Re: Error in Validation [message #224745 is a reply to message #224727] Thu, 15 March 2007 05:49 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
select 1 from dual where '' > ''
Nothing can be compared with null or ''.
The comparison always gives false only.
By the way I didn't understand the concept of NVL(:FROM_CODE,'')
'' is something like to_char(null).
So, Try something else (may be space ' ' or zero '0' or depends on your business logic).

Previous Topic: POST-CHANGE trigger
Next Topic: rename/ format column headings
Goto Forum:

Current Time: Tue Oct 25 21:21:00 CDT 2016

Total time taken to generate the page: 0.11609 seconds