Subject | Re: [firebird-support] Re: empty string=null ? |
---|---|
Author | Paul Vinkenoog |
Post date | 2006-06-27T02:13:18Z |
Hello cantak3,
different things", which is correct. But he should have avoided the
'<>' operator because that suggests an SQL statement which returns
true (whereas in reality it doesn't).
think they're False because if the test expression of an "if"
statement is NULL, the "then" clause is skipped, but try this:
if (not (A <> B)) then...
if (not (A = B)) then...
If either A or B is NULL, the "then" block will be skipped in both
cases (and the "else" block, if present, executed), because not(NULL)
yields NULL -- after all, the inverse of an unknown is an unknown.
Greetings,
Paul Vinkenoog
> "roskiy" <roskiy@...> wrote:I guess what roskiy meant was "An empty string and a Null are two
>>
>> In FB1.5
>> empty string<>null
> This is not correct.
different things", which is correct. But he should have avoided the
'<>' operator because that suggests an SQL statement which returns
true (whereas in reality it doesn't).
> Let A = null and B = Empty Str.Watch out! They don't return False, they both return NULL. You may
>
> (A <> B) returns FALSE
> (A = B) returns FALSE
think they're False because if the test expression of an "if"
statement is NULL, the "then" clause is skipped, but try this:
if (not (A <> B)) then...
if (not (A = B)) then...
If either A or B is NULL, the "then" block will be skipped in both
cases (and the "else" block, if present, executed), because not(NULL)
yields NULL -- after all, the inverse of an unknown is an unknown.
Greetings,
Paul Vinkenoog