[ic] Loading of SQL table failing

Barry Treahy, Jr. interchange-users@icdevgroup.org
Mon Sep 16 18:25:01 2002


Barry Treahy, Jr. 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 ?

Barry