home *** CD-ROM | disk | FTP | other *** search
Wrap
Newsgroups: comp.databases.sybase Path: sparky!uunet!csfb1!jziner From: jziner@csfb1.fir.fbc.com (Jeffrey A. Ziner) Subject: RE: insert of null into non_null field Message-ID: <BxKAAp.HE7@csfb1.fir.fbc.com> Sender: news@csfb1.fir.fbc.com (Usenet News Account) Reply-To: uunet!csfb1!jziner Organization: First Boston Corporation Date: Wed, 11 Nov 1992 17:08:48 GMT Lines: 45 In article <1992Nov10.181730@genethon.fr>, you write: |> |> It turns out that it is possible, under Sybase 4.2 on a Sun, to insert |> NULL values into fields that are declared NOT NULL. Has anybody else |> seen this problem? Does this problem exist under 4.8, which we will |> install soon? (I was expecting the substring to return an empty string |> forgetting that empty strings do not exist.) |> |> Stuart |> |> create table t(f varchar(20) not null) |> insert into t select substring("X", 2, 255) |> (1 row affected) |> insert into t values("F") |> (1 row affected) |> select f from t |> f |> -------------------- |> NULL |> F |> |> (2 rows affected) |> select f from t where f = f |> f |> -------------------- |> F |> |> (1 row affected) |> select distinct f from t |> Msg 530, Level 16, State 1: |> Line 1: |> Attempt to insert NULL value into column 1 in work table (table id |> -81); column does not allow NULLS. UPDATE fails. |> f |> -------------------- |> |> (1 row affected) |> select @@version |> |> ----------------------------------------------------------------- |> SQL Server/4.2/P/sun4/os4/EBF632/OPT/Tue Aug 27 11:58:42 PDT 1991 |> Yes this does occur within the 4.8.1.1 (GA 3) release of Sybase. I suggest you report this as a problem and you might see it fixed in release 4.9.1 or 5.0. Good Luck. Jeff Ziner