× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, Sep 23, 2015 at 4:58 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
On Wed, Sep 23, 2015 at 2:13 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

Let's say I have a nullable variable call MYVAR. And let's say that
its null indicator is currently on. So in SQL, MYVAR is simply equal
to NULL. [...]

In SQL, MYVAR > 2 would be False, since any comparison with NULL is
False.

No, no it wouldn't and no, no it isn't...

In SQL,
when MYVAR is NULL
then
MYVAR > 2 is unknown; neither true or false.

Fine. I made the all-too-common verbal fumble of not pointing out
where the three-valued logic collapses to two-valued logic for
purposes of program flow. (That is, a truth value of "Unknown" is just
as good as "False" when you have a piece of code that is conditionally
executed, such as an IF block. Similarly, in SQL, a record has to
either be in the result set or not in the result set; it's not like
there's a "well, maybe it's in the result set, but we don't know".)

I'm sure you realize this, but it just goes to show how easy it is to screw
up 3 valued logic.

I can agree with that. I will say that it's both easy to screw up the
logic itself, and also easy to screw up talking about the logic.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.