开发者

Load data skipping first column

I am trying to import the data from... ftp://ftp.bls.gov/pub/time.series/la/la.area_type

mysql -e"CREATE TABLE test.area_type (area_type_code varchar(100), state_wide varchar(100))"
mysql -e"load data local infile 'la.area_type' into table test.area_type fields terminated by '\t' ignore 1 lines;"

The above load data command does import the second column but fails to import the first column. What should be the correct load data command to im开发者_JAVA百科port the data?


The csv seems to be in dos format, try

dos2unix la.area_type

and re-import again

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜