Re: Oracle 7.1 Enhancements

From: Michael Nolan <nolan_at_helios.unl.edu>
Date: 23 Jun 1994 05:48:03 GMT
Message-ID: <2ub7mk$ca8_at_crcnis1.unl.edu>


mem8321_at_u.cc.utah.edu (Mark Miller) writes:

: A better example: You want to query all the employees that may live out
: of Nebraska.
 

: You have to use
: Select * from employee where nvl(state,'ZZ') <> 'NB';
: instead of
: Select * from employee where state <> 'NB';

Unfortunately, this example won't find employees that don't live in Nebraska, for which the approved abbreviation is 'NE', but it will find employees that don't live in New Brunwick, Canada.

More to the point, while it may be argued that there is a major difference from a mathematical perspective between a NULL and a zero-length field, there are serious implementation issues surrounding how one specifies the difference between the two in a product like Oracle Forms.

For example, you're entering the state information described above in a new record. If you skip that field (by pressing ENTER) does that create a NULL or a zero-length value. If I delete 'NB' from the state field, do I get a NULL or a zero-length value?

---
Michael Nolan, Sysop for the DBMS RoundTable on GEnie
nolan_at_notes.tssi.com, dbms_at_genie.geis.com
Lincoln, Nebraska
Received on Thu Jun 23 1994 - 07:48:03 CEST

Original text of this message