views:

278

answers:

1

I am trying to upload a tab delimitted file with MySQL. I want a query something likes this: LOAD DATA LOCAL INFILE 'file' INTO TABLE tbl FIELDS TERMINATED BY 'TAB' Is there something I can subsitute for TAB to make this work?

+1  A: 

have you tried '\t' the escape sequence + "T" is considered tab... haven't tried, but might be what you need

DRapp
That's the one. MySQL uses the standard 'C' escape sequences for special characters.
Marc B
still doesn't work... I should be able to use `FIELDS TERMINATED BY '/t'` or `FIELDS TERMINATED BY 'T'`?
Brian
`FIELDS TERMINATED BY '\t'` is what you want to use , not `FIELDS TERMINATED BY '/t'`.
staticsan