Re: Oracle confuses character string '' and NULL values

From: Hans Forbrich <forbrich_at_tibalt.supernet.ab.ca>
Date: 9 Aug 1994 11:15:31 -0600
Message-ID: <328djj$6r2_at_tibalt.supernet.ab.ca>


jfr_at_trwlasd.com wrote:
> We have been having a very tough problem with Oracle. We are using
> NEXTSTEP's DBKit and the Oracle adaptor to access our Oracle Sun server
> from NEXTSTEP applications. We have several columns that are CHAR NOT
> NULL. In our application written in Objective-C, CHAR data is stored as
> C-strings. Often our C-string data is blank, so it is represented as a
> zero-length character string. When this data is inserted into a table,
> the adaptor creates an INSERT statement that supplies a zero-length
> character string in the host variable. Unfortunately, Oracle barfs as in
> the following example:

Unfortunately, for as long as I've used Oracle RDBMS (since Oracle V4), Oracle Corp. has insisted that NULL and '' are equivalent. This has created some incredibly complex work-arounds in my apps, not the least of which has been the addition of (confusing) 'IS_NULL' fields.

While I am generally pleased with the company's product, this (and the handling of views) has been a sore point with me. I keep hoping that Oracle will fix this issue. I suspect that the comfort level created by Oracle's reliability may some day drop below the frustration level on this point - then I'll switch.

(My frustration with both NULLs and VIEWS can be best described  by C.J. Date's columns in Database Programming & Design. He  very eloquently describes the difference between Relational  theory and SQL implementation - and why SQL ain't a true  representation of Relational.)

Now back off the soap-box ...

/Hans Received on Tue Aug 09 1994 - 19:15:31 CEST

Original text of this message