Re: Useful Oracle books - C.J. Date theory vs. practicality
- From: Nuno Souto <dbvision@xxxxxxxxxxxxxxx>
- To: oracle-l@xxxxxxxxxxxxx
- Date: Sun, 30 May 2004 01:58:27 +1000
Hmmm, I'm having trouble posting from the notebook...
From: "Lex de Haan" <lex.de.haan@xxxxxxxxxxxxxx>
> no problem. that's the only thing it's supposed to do ;-)
Yeah, that's why I tried to use IS NULL: to reduce what is at
the start a three-valued logic problem and bring it under
control of two-valued logic.
and I guess it is hard to make your workaround generic -- what if the
<condition> is constructed dynamically, at run time, and can e.g. be a
compound predicate with some ANDs and ORs?
then your "outer IF" becomes almost impossible to generate...
Sure. But that was not the case of this workaround: it applies only
to PL/SQL "static" code. Things get of course unstuck for dynamic
conditions. Although ANDs and ORs I can't quite see as making it
necessarily more complex. The problem IME is the three-valued
logic itself and how to handle it with two-value SQL logic.
The NVL and NVL2 functions in Oracle help across the board - in
fact the workaround I mentioned can be re-coded using it - but
it is still a kludge. Essentially, one ends up associating
a particular outcome of three-valued logic with a specific value
in two-valued syntax. I mean something like this:
(IF - or predicate) (nvl(<var>,'A') = 'something') (THEN yaddayadda)
Ie, replace the outer IF by a given *known* value check that
may (or may not) match a subsequent comparison.
Always very hard to handle three-valued logic without some formal
construct or syntax that can cover all options. Which brings me
to my next question, if you'd be so kind:
Is there an agreed syntax (or language) anywhere that can hold
against three-valued logic? As in: commercially available?
Os is three-valued logic condemned to forever be the
fly in the ointment (so to speak) of SQL?
--
Cheers
Nuno Souto
in sunny Sydney, Australia
dbvision@xxxxxxxxxxxxxxx
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
- Follow-Ups:
- RE: Useful Oracle books - C.J. Date theory vs. practicality
- From: Lex de Haan
- References:
- RE: Useful Oracle books - C.J. Date theory vs. practicality
- From: Lex de Haan
- Re: Useful Oracle books - C.J. Date theory vs. practicality
- From: Binley Lim
Other related posts:
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » RE: Useful Oracle books - C.J. Date theory vs. practicality
- » Re: Useful Oracle books - C.J. Date theory vs. practicality
and I guess it is hard to make your workaround generic -- what if the <condition> is constructed dynamically, at run time, and can e.g. be a compound predicate with some ANDs and ORs? then your "outer IF" becomes almost impossible to generate...
Sure. But that was not the case of this workaround: it applies only to PL/SQL "static" code. Things get of course unstuck for dynamic conditions. Although ANDs and ORs I can't quite see as making it necessarily more complex. The problem IME is the three-valued logic itself and how to handle it with two-value SQL logic.
- RE: Useful Oracle books - C.J. Date theory vs. practicality
- From: Lex de Haan
- RE: Useful Oracle books - C.J. Date theory vs. practicality
- From: Lex de Haan
- Re: Useful Oracle books - C.J. Date theory vs. practicality
- From: Binley Lim