/ Published in: SQL

Fields are tab delimited and need to match table schema.
I've found the tab separator ASCII(009) preferable over using a comma.
The second version can help remove double quotation marks around character fields.
Don't forget the keyword LOCAL.
I've found the tab separator ASCII(009) preferable over using a comma.
The second version can help remove double quotation marks around character fields.
Don't forget the keyword LOCAL.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
> LOAD DATA LOCAL INFILE '/tmp/testdata.txt' INTO TABLE testtable FIELDS TERMINATED BY '\t'; > LOAD DATA LOCAL INFILE '/tmp/VICIDB/matltran.txt' INTO TABLE matltran FIELDS TERMINATED BY '\t' FIELDS OPTIONALLY ENCLOSED BY '"';
Comments
