---- Original Message ---- From: "Oddvar Kragseth" <[EMAIL PROTECTED]> To: <mysql@lists.mysql.com>; <[EMAIL PROTECTED]> Sent: Sunday, February 13, 2005 3:35 PM Subject: Importing a separated file into mysql, national charset problem??
> I'm importing a file into mysql. > > Most work fien, but numbers are given like this : > `487,90`116,40`4467,00` > > This creates a problem, as the decimal numbers are NOT read... i.e i > get 487.00 , 116.00 in my database. > > Is this a "national" problem as we use komma as a decimal seperator > in Norway? > > Do i set this in windows or in LOAD DATA INFILE statement?? > We have this problem too in Czech Republic :-) I resolve this problem using this method: 1) I create temporary table with identical tructure except decimal, real, double, float and numeric fields. All this fields (eg. NUMERIC(6,2) ) I define as VARCHAR with the same length. 2) I load data into temporary table using LOAD DATA INFILE 3) I convert all "numeric" values using UPDATE TABLE temptable SET numeric_field=REPLACE(numeric_field, ',' , '.') 4) I load (or append) data from temporary table into main table. Petr Vileta http://www.zivnosti.cz http://www.practisoft.cz -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]