>>I want to convert a VFP table into a MySQL table.
>>
>>I tried several converters and they give different results.
>>
>>For example, a VFP table with these fields:
>>
>>NPERCNT N(6, 2) Not Null, ;
>>NAMT N(19, 6) NOT NULL, ;
>>
>>
>>gives:-
>>a) The N(6, 2) translates into one of these: DECIMAL(5,2) or DECIMAL(6,2) or DECIMAL(8,2) or DECIMAL(9,2) .
>>b) The N(19, 6) translates into one of these: DECIMAL(18,6) or DECIMAL(19,6) o DECIMAL(25,6) or DECIMAL(26,6)
>>
>>That's a wide variety. Can someone suggest which is the best answer?
>>
>>
>>Also, should Logical fields become BIT, boolean or tinyint(1)?
>>
>>
>>Cyril
>
>The best answer depends on how much effort you're planning to take on your VFP application rewrite. The closer to the VFP table structure, the easier your rewriting will be (that is true even if your application is data driven and you work with data dictionaries).
>
>In MySQL, TinyInt(1) and Boolean are synonyms. In these cases as in others, you should also check how your connector handles the conversion between MySQL and VFP data types. For instance, when connected to the MySQL ODBC 5.1 driver, VFP reads a Bit(1) as Logical and TinyInt(1) as Number/Integer.
Thanks for the info.
So for N(6, 2) I can use DECIMAL(6,2) and for N(19, 6) I can use DECIMAL(19,6)?
It is strange that several commercial converters give different answers!
Cyril