[ic] Loading of SQL table failing

Dan Browning interchange-users@icdevgroup.org
Mon Sep 16 19:29:01 2002


At 03:25 PM 9/16/2002 -0700, you wrote:
>>>>>>>I'm having roubles converting from dbm to MySQL.  I have managed to 
>>>>>>>bring up a smaller table without any issue, but the products table 
>>>>>>>will not load.  I had added the additional fields, and double 
>>>>>>>checked them against my original products.txt, and it is 
>>>>>>>perfect.  Where I may be running into problems is the lack of 
>>>>>>>documentation on all of the fields used in the .mysql file.
>>>>>>>Anyway, I'm stuck...
>>>>>>>
>>>>>>>I have the debugging enabled, if you need to see all of the 
>>>>>>>details...  BTW, this is 4.8.6...
>>>>>>>
>>>>>>>[snip]
>>>>>>>
>>>>>>>- - - [14/September/2002:21:15:50 -0400] - - table 'products' 
>>>>>>>failed: products import failed: You have an error in your SQL syntax 
>>>>>>>near ' '', '', '', 'X', 'X', 'X', 'X', '', '098.pdf', 'T3')' at line 1
>>>>>>MySQL is definitely gaging on the import data step here. Perhaps you 
>>>>>>a trying to import empty data into a field which is defined as NOT 
>>>>>>NULL, or maybe there is an errant carriage return somewhere in the 
>>>>>>file, breaking a single row into two pieces.
>>>>>
>>>>>
>>>>Ok, I believe I've isolated what appears to be the problem but it makes 
>>>>no senese.  The import is choking on a field named 'phase' which is not 
>>>>a MySQL reserved word nor it is documented as an IC reserved word.  Why 
>>>>is this happening?   I can do the obvious, changing the name, but I 
>>>>don't want to do a guessing game on what others undocumented reserved 
>>>>words exist...
>>>
>>>
>>>
>>>As what seems to be a rather typical experience for me, I shoot of my 
>>>mouth too early when I'm tired...  After changing the name from phase to 
>>>phaze, the first record loaded but it failed on the second...
>>
>>
>>I took the Database products NUMERIC fieldxxx off of everything but price 
>>and the database is loading...I read pages of paper today on MySQL and 
>>fail to see why a blank numeric field would cause the load to 
>>fail...  Any ideas?
>More over, if those once VARCHAR/NUMERIC definitions are changed to 
>DECIMAL's, they too still blow up if the field being loaded is empty... Is 
>there are parameter I can use to suppress this behavior ?

It would be nice if I had time to test it out for you, but I'll can say is 
that perhaps a DEFAULT=... is in order?


--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies      <dan.browning@kavod.com> |
| (360) 882-7872 x7, 6700 NE 162nd Ave, Suite 210, Vancouver, WA |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
Everything is controlled by a small evil group to which, unfortunately,
no one we know belongs.