- 论坛徽章:
- 0
|
源文件内容是用shell产生的随机数据,如下:
1 顧客1 男 10000000 1928-01-01 80 200000000 300000000 800000000 customer1@gmail.com 杭州 1 會計師 1234567890 是
2 顧客2 男 10000000 1953-01-01 55 200000000 300000000 800000000 customer2@gmail.com 成都 2 會計師 1234567890 是
3 顧客3 女 10000000 1978-01-01 30 200000000 300000000 800000000 customer3@gmail.com 杭州 3 會計師 1234567890 是
4 顧客4 男 10000000 1913-01-01 95 200000000 300000000 800000000 customer4@gmail.com 成都 4 商人 1234567890 是
使用load data时并没有报错:
mysql> LOAD DATA INFILE '/tmp/customer.txt' INTO TABLE customer;
Query OK, 10001 rows affected, 65535 warnings (0.13 sec)
Records: 10001 Deleted: 0 Skipped: 0 Warnings: 150015
但是查询下来只有第一列数据生效了:
mysql> select * from customer limit 1;
+------------+------+-----+---------------+----------+-----+----------+------+--------+-------+--------+-------------+------------+----------------+--------------+
| CustomerID | Name | Sex | HKIDOrPportNo | Birthday | Age | Telphone | Fax | Mobile | Email | Region | HomeAddress | Occupation | CustomerSerial | IsLikeAccept |
+------------+------+-----+---------------+----------+-----+----------+------+--------+-------+--------+-------------+------------+----------------+--------------+
| 1 | | | | NULL | 0 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | | NULL |
+------------+------+-----+---------------+----------+-----+----------+------+--------+-------+--------+-------------+------------+----------------+--------------+
有什么办法解决这个问题吗?
ps:上面的文件在linux直接more是乱码的,我down下来用ultraedit查看是没有问题的
[ 本帖最后由 geyun616 于 2008-7-11 12:18 编辑 ] |
|