home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / informix / 1838 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.9 KB

  1. Path: sparky!uunet!europa.asd.contel.com!gatech!emory!letterkenn-emh1.army.mil!Root
  2. From: Root@letterkenn-emh1.army.mil
  3. Newsgroups: comp.databases.informix
  4. Subject: question on load vs. count(*) counts
  5. Message-ID: <9427@emory.mathcs.emory.edu>
  6. Date: 31 Aug 92 20:48:07 GMT
  7. Sender: walt@mathcs.emory.edu
  8. Reply-To: Root@letterkenn-emh1.army.mil
  9. Lines: 31
  10. X-Informix-List-ID: <list.1412>
  11.  
  12. A programmer at our site created a new table (unisys 5000, sql 4.0.UE2,
  13. and SE engine) and then made a flat pipe-separated file with say, 50
  14. records in it.  Using sql load command, try to load it into empty table.
  15.  
  16. When the 43rd row had a problem, of course the load halted and a count
  17. of successful rows loaded was displayed, and the reason (error) encountered.
  18.  
  19. What we THINK we notice is:
  20.  
  21. If the error is 846 Number of values in load file not equal to # columns, the
  22. count displayed is 42, and "select count(*) from table" also yields 42.
  23. No problem, right? The error in my load file is on line 43, and sure enough,
  24. there it is. Neat debugging tool.
  25.  
  26. But, when the errors was either 391 cannot insert a null into column, or
  27. 239 could not iinsert new row - duplicate value in unique index column
  28. the count displayed is usually 48 (always a multiple of 16).  The error
  29. occurs within 16 rows before the displayed count. "select count(*) from
  30. table" displays a count of existing rows which is always less than the
  31. loader said, but not more than 16 less.  In this example it said 48 rows
  32. loaded, and the actual select count(*) says 42.  Each time we try this we
  33. have run delete from table first.
  34.  
  35. Can anyone explain?  We also have a call into hotline.  Is this a bug in
  36. 4.0 UE2?  Or are we missing something here?  Its easy to work around in an
  37. empty table, but not in the real world.  Thanks.  This BB is really great
  38. for quick answers to problems; so much expertise in one place!  Thanks in
  39. advance.
  40.  
  41. Ann Barnes
  42. Letterkenny Army Depot
  43.