Re: Need your help on this strange loading problem ... Thanks
Posted in 2006
What if the person looked at the file with vi and then inadvertently added a blank file to the end. This would cause a problem. So, he may not have realized that the file changed between runs. I would certainly look at the line that gave me the problem in the load from statement. I think Informix tells you what line it is in. Jonathan Leffler wrote: > In the previous episode, Jonathan Leffler wrote: > > Henry wrote: > >> I met with a strange problem. I have a script to load data from a > >> text file into a table. On the first run, I hit with an error said > >> that the number of columns mismatch. But, when I tried another time > >> with the same source file, i received no error. Is there any > >> explanation to this strange phenomenon? > >> > >> Error message: 846: Number of values in load file is not equal to > >> number of columns. > > > > Was the environment exactly the same? Specifically, could DBDELIMITER > > have been set one time and not the other? > > > > (What version? What platform?) > > In response, Henry wrote: > > Yes, environment is the same. I have hard-coded delimiter type in my > > loading script. So, I believe this is not the problem. > > > > IDS version: IBM Informix Dynamic Server Version 9.40.FC7 > > Platform: HP-UX B.11.23 U ia64 (tc) > > Well, computers are generally extremely consistent. Something changed. > > You have a number of possibilities: > * The data file > * The software you are using > * The database you are loading > * The environment > * Anything I've not yet thought of! > > At the moment, you are probably going to say 'none of the first four > items changed', so it must be the fifth. > > Could someone have played merry hell with the sqlhosts file so that you > are no longer playing with the database you thought you were playing with? > > Did you have a stray cosmic ray go past and flip a bit in your > computer's memory? > > -- > Jonathan Leffler #include <disclaimer.h> > Email: jleffler@earthlink.net, jleffler@us.ibm.com > Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/