home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / database / sybase / 292 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.9 KB  |  57 lines

  1. Newsgroups: comp.databases.sybase
  2. Path: sparky!uunet!csfb1!jziner
  3. From: jziner@csfb1.fir.fbc.com (Jeffrey A. Ziner)
  4. Subject: RE: insert of null into non_null field 
  5. Message-ID: <BxKAAp.HE7@csfb1.fir.fbc.com>
  6. Sender: news@csfb1.fir.fbc.com (Usenet News Account)
  7. Reply-To: uunet!csfb1!jziner
  8. Organization: First Boston Corporation
  9. Date: Wed, 11 Nov 1992 17:08:48 GMT
  10. Lines: 45
  11.  
  12.  
  13.  
  14. In article <1992Nov10.181730@genethon.fr>, you write:
  15. |> 
  16. |> It turns out that it is possible, under Sybase 4.2 on a Sun, to insert
  17. |> NULL values into fields that are declared NOT NULL.  Has anybody else
  18. |> seen this problem?  Does this problem exist under 4.8, which we will
  19. |> install soon?  (I was expecting the substring to return an empty string
  20. |> forgetting that empty strings do not exist.)
  21. |> 
  22. |> Stuart
  23. |> 
  24. |> create table t(f varchar(20) not null)
  25. |> insert into t select substring("X", 2, 255)
  26. |> (1 row affected)
  27. |> insert into t values("F")
  28. |> (1 row affected)
  29. |> select f from t
  30. |>  f                    
  31. |>  -------------------- 
  32. |>  NULL                 
  33. |>  F                    
  34. |> 
  35. |> (2 rows affected)
  36. |> select f from t where f = f
  37. |>  f                    |>  -------------------- 
  38. |>  F                    
  39. |> 
  40. |> (1 row affected)
  41. |> select distinct f from t
  42. |> Msg 530, Level 16, State 1:
  43. |> Line 1:
  44. |> Attempt to insert NULL value into column 1 in work table (table id
  45. |> -81); column does not allow NULLS.  UPDATE fails.
  46. |>  f                    
  47. |>  -------------------- 
  48. |> 
  49. |> (1 row affected)
  50. |> select @@version
  51. |>                                                                    
  52. |>  ----------------------------------------------------------------- 
  53. |>  SQL Server/4.2/P/sun4/os4/EBF632/OPT/Tue Aug 27 11:58:42 PDT 1991 
  54. |> 
  55.  
  56. 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
  57.