Re: Q: Suppressing NULLs using Forms 4.5

From: Andrew Tompkins <andrewto_at_kingfish.cse.tek.com>
Date: 1997/06/05
Message-ID: <ANDREWTO.97Jun5082958_at_kingfish.cse.tek.com>#1/1


[Quoted] In article <33949800.49219898_at_www.sigov.si>   jurij.modic_at_mf.sigov.mail.si (Jurij Modic) writes:

>
> I can't see how CHR(0) or space can be of more help then NULL in IF or
> WHILE statements. In fact, it can give you wrong ansver while NULL
> can't. What exactly are this nastiness?
>
> And wath do you replace nulls in you numeric columns with?
>

Sorry. Guess my email didn't make it. CHR(0) and space will be counted in a COUNT(*) type query while NULL will not. We use a lot of COUNT(*) queries in our system so we defined all of the columns in all of our tables as NOT NULL and gave the VARCHAR2 and DATE columns a default value of ' ' initially, then chr(0), and the NUMBER columns a default of 0.

Also, conditions for 'if' and 'while' statements return 3 values (TRUE, FALSE and NULL) rather than the standard 2 (TRUE and FALSE). NULL is always treated like FALSE where, in many cases, the developer may want if treated like TRUE or as a third possibility. Not using NULL means we don't have to check for and deal with it constantly.

--Andy
-- 
-------------------------------------------------------
| Andrew G. Tompkins    | #include <disclaimer.std.h> |
| Software Design Eng.  ------------------------------|
| Tektronix, Inc.                                     |
| Phone: (503) 627-5172      fax: (503) 627-5548      |
| email: Andrew.Tompkins_at_tek.com (work)               |
|        andytom_at_teleport.com (home)                  |
| http://www.teleport.com/~andytom/                   |
-------------------------------------------------------
Received on Thu Jun 05 1997 - 00:00:00 CEST

Original text of this message