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

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!sun!amdcad!weitek!pyramid!infmx!news
  2. From: cortesi@informix.com (David Cortesi)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: question on load vs. count(*) counts
  5. Message-ID: <1992Sep1.165712.21321@informix.com>
  6. Date: 1 Sep 92 16:57:12 GMT
  7. References: <9427@emory.mathcs.emory.edu>
  8. Sender: news@informix.com (Usenet News)
  9. Reply-To: cortesi@informix.com
  10. Organization: Informix Software, Inc.
  11. Lines: 27
  12.  
  13. In article <9427@emory.mathcs.emory.edu> Root@letterkenn-emh1.army.mil writes:
  14. > If the error is 846 Number of values in load file not equal to # columns, the
  15. > count displayed is 42, and "select count(*) from table" also yields 42.
  16. > But, when the errors was either 391 cannot insert a null into column, or
  17. > 239 could not iinsert new row - duplicate value in unique index column
  18. > the count displayed is usually 48 (always a multiple of 16).  The error
  19. > occurs within 16 rows before the displayed count. "select count(*) from
  20. > table" displays a count of existing rows which is always less than the
  21. > loader said, but not more than 16 less.
  22.  
  23. Pretty clearly, LOAD is counting input rows but using an insert cursor
  24. and PUT to do the inserts.  PUT blocks rows (probably blocks of 16 in
  25. your case!) before sending them to the engine where an error such as
  26. -391 would be detected.  The count of rows could be adjusted based on
  27. the value PUT would return in the SQL Communications area, but it
  28. would appear this isn't being done. That would be my guess as an amateur
  29. esql/c programmer, anyway... This might be the same as bug #4465:
  30.  
  31. Bug Number    [    4465]... Scheduled Fix Ver  [  ][4.00.UC1A3]
  32. ..  Closed [10/12/89]...
  33. Short Desc  [LOAD DOES NOT SET THE SQLERRD[2] SET TO # OF ROWS PROCESSED      ]
  34.                            Long Bug Description
  35.       [Because of the fact that sqlload was not setting the sqlerrd[2]  ]
  36.       [flag that indicates the number of rows that were inserted, 4gl   ]
  37.       [programs has no way of finding out if the rows were processed    ]
  38.       [correctly.                                                       ]
  39.