Re: Check if text item is NULL?
Date: Sun, 18 Apr 1999 09:55:23 -0400
Message-ID: <37193af5_at_news.itribe.net>
In both SQL and PLSQL use the operators:
IS NULL IS NOT NULL to test for null or not null
for your test, try:
[Quoted] if(:block_name.text_item_name is null) then
message('NULL'); pause;
else
message('NOT NULL');
end if;
The reason for this is when oracle evaluates any expression (other then IS [NOT] NULL, NVL() and || ) that contains a null then a null is always returned.
The following expressions evaluate to null:
:item = null
2+null
true or null
HTH Mark
vagelis Hristidis wrote in message <7fa9sq$9s1$1_at_ulysses.noc.ntua.gr>...
>I use Forms 5.0.
>message('###'||:block_name.text_item_name||'###');
> IF(:block_name.text_item_name=NULL)
> then
> message('NULL');
> message('');
> else
> message('NOT NULL');
> message('');
> end if;
>
>When the above code is executed and text_item_name is empty I get 2 message
>boxes
>1st) ######
>2nd)'NOT NULL' !!!!!!!!!!!!!!!!!!!!????????????
Received on Sun Apr 18 1999 - 15:55:23 CEST