Zojak_Quaguz Posted January 4, 2011 Share Posted January 4, 2011 This one perplexes me. I can't find anything in the documentation about it, and I would be surprised if MySQL doesn't include functionality for such a simple task. LOAD DATA INFILE 'blah.txt' INTO TABLE blah FIELDS TERMINATE BY ' ' LINES TERMINATED BY '\n'; example file: 83726291 4 92923612 1 42093723 0 12321742 1 91283747 2 01249243 4 It keeps loading the entire line into a single field, so my table ends up with column 2 being NULL. Link to comment https://forums.phpfreaks.com/topic/223368-how-to-import-a-white-space-delimited-text-file-using-load-data-infile/ Share on other sites More sharing options...
Zojak_Quaguz Posted January 4, 2011 Author Share Posted January 4, 2011 Ok, now it's working. No idea why it wasn't before. Link to comment https://forums.phpfreaks.com/topic/223368-how-to-import-a-white-space-delimited-text-file-using-load-data-infile/#findComment-1154668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.