Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.databases Subject: Re: Outerjoin implementation? Message-ID: Date: 21 Sep 90 17:47:53 GMT References: <5803@plains.NoDak.edu> <1990Sep20.161204.13014@tfic.bc.ca> Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California. Lines: 47 In-reply-to: clh@tfic.bc.ca's message of 20 Sep 90 16:12:04 GMT In article <1990Sep20.161204.13014@tfic.bc.ca> clh@tfic.bc.ca (Chris Hermansen) writes: NULLs almost guarantee strange `gotchas', don't you think? Only (IMHO) if you don't understand the concept. For instance, instead of writing a statement like update foo set bar = 37 where qqsv != 0 the SQLer has to decide if update foo set bar = 37 where qqsv != 0 or qqsv is null is what s/he REALLY means. Put another way, update foo set bar = 37 where qqsv != 0 and qqsv isnt null provides no extra degree of refinement over the first update statement, even though it appears to (for the casual observer, at least). Use of these statements depend on the definition of the data. I would hope that the "casual user" would understand the data he is dealing with. For instance, in the above statements, it would seem that qqsv might be the primary key of foo, in which case, it can never be NULL, so all 3 statements degenerate into the first. If its not the primary key, then there must be a reason for qqsv to be NULL and (most likely) a completely different reason why qqsv might be 0 which would influence the use of "IS NULL". It's also really handy that select qqsv,count(*) from foo group by qqsv produces a separate line for every row in foo that has a null in qqsv, don't you think? I don't have a database handy, but I think it also produces a separate line for every row in foo that has a 1 in qqsv, so what's your point? There's no substitute for an intelligent query. -- ==================================================================== David Masterson Consilium, Inc. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"