Re: MySQL-csv insert into tables doesn't take effect
From: Markku Kolkka (markkuk_at_tuubi.net)
Date: 03/16/05
- Previous message: Kumara: "Firestarter Configuration"
- In reply to: M E Fieu: "MySQL-csv insert into tables doesn't take effect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: fedora-list@redhat.com Date: Wed, 16 Mar 2005 13:43:46 +0200
M E Fieu kirjoitti viestissään (lähetysaika keskiviikko, 16.
maaliskuuta 2005 09:26):
> Hi.. I create a data.csv file using excel file and
> convert to CSV as following
(...)
> but when i tried to load the CSV file into the table
> department, the name and job column still shown as
> NULL? Why?? Any soiution?
>
> mysql>load data local infile '/root/data.csv' into
> table department;
LOAD DATA expects by default that fields are separated by tabs,
not commas. You must specify that a comma is used as a
delimiter:
LOAD DATA LOCAL INFILE '/root/data.csv' INTO TABLE department
FIELDS TERMINATED BY ',';
http://dev.mysql.com/doc/mysql/en/load-data.html
-- Markku Kolkka markku.kolkka@iki.fi -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
- Previous message: Kumara: "Firestarter Configuration"
- In reply to: M E Fieu: "MySQL-csv insert into tables doesn't take effect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
Loading