Re: updating informix
Posted in 1992
Harry Bochner <bochner@das.harvard.edu> writes: > .. other stuff deleted > > If we're going to talk about theoretical reasonableness, then I think the > whole treatment of null strings is wrong. > > define x char(5) > let x = "" > > Theoretically, the zero length string "" should be padded to 5 blanks when > it's assigned to x, so the effect should be the same as > let x = " " > but it isn't: > let x = "" > if x is null then > display "null" > end if > _does_ print "null", while > let x = " " > if x is null then > display "null" > end if > doesn't. AND these tests produce the same results in fglpc 4.00.UH1 and > 4.10.UC1. So the behavior I complained about might be reasonable, but it's > also inconsistent with the rest of the language. I just want to remind everyone that the NULL value is not spaces on a CHAR variable, nor zero on a numeric variable. The NULL value is 'I don't know'. If you have a column named salary, when you give it the value zero that means that the poor guy has no salary, if the value is NULL that means that you don't know what the salary is. Same thing for a CHAR var, e.g. a middle name column: spaces is that the guy doesn't have a middle name, NULL is again 'We don't know,' nobody entered a middle name for this record. I think that difference becomes important depending on the type of application. -- --------------------------------------------------------------------------- Luis P. Caamano | lpc@dickens.com Dickens Data Systems, Inc. | uunet!ddssuprs!lpc Norcross, GA | (404) 242-5991 --------------------------------------------------------------------------- If you think you know it all, you'll stop learning. -myself The more I learn, the more I know I know nothing. -somebody else