Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Nottingham, England

    Unanswered: NULL and Empty strings...

    Running Oracle Database 11g Release - 64bit Production

    I came across this problem 8 (yes, that's right EIGHT) years ago when I first tried to port our software to Oracle (I think at the time it was 8i or something).
    I just cannot believe I'm here again...
    The port has now been resurrected, this time to 11g and it’s STILL a problem.
    Now after all this time I was sure that Oracle would have sorted it - BUT NO - still the same problem.
    Trying to insert an empty string into a NOT NULL column results in "ORA-01400: cannot insert NULL…" - no, NO, NOOOOOO…
    Surely after all this time and all the negativity regarding this ‘problem’ you must now be able to distinguish between an empty string and NULL? – Seems not…
    We have a very large product which I have successfully ported from SQL Server to Informix and DB2 but once again it looks like this fundamental difference from all the other vendors will kill it dead.

    Test scenario:

    create table mytable
    mycol1 NVARCHAR2 (10) NOT NULL,
    mycol2 NVARCHAR2 (10)

    insert into mytable (mycol1, mycol2) values (NULL, NULL)
    -- obviously fails

    insert into mytable (mycol1, mycol2) values ('', '')
    -- fails! - I'm starting to cry at this point

    insert into mytable (mycol1, mycol2) values (' ', '')
    -- works - am literally sobbing now


  2. #2
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 5
    Check what Justin Cave (Oracle ACE) and Tom Kyte, Oracle Vice President have said about the issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts