Import from CSV file resulting in all fields being null
Using the CSV using LOAD DATA functionality to load my CSV datafile into a MySQL table, the primary key field gets populated as it should, however, all the other fields result with NULL values.
For example the table is called members with the following structure:
FIELD_____TYPE_________COLLATION______NULL______DEFAULT
MemberID__int(11)_______________________No________None
FirstName__varchar(20)___utf8_general_ci____Yes_______NULL
LastName__varchar(20)___utf8_general_ci____Yes_______NULL
eMail_____varchar(50)____utf8_general_ci____Yes_______NULL
Access____varchar(15)_____________________No_______Guest
ListMe____tinyint(1)______________________Yes_______NULL
The csv file being import is something like:
11,"John","Doe","JohnDoe@domain.com","Guest",0
12,"Jane","Doe","JaneDoe@domain.com","Guest",-1
The resulting data imported looks something like:
11,NULL,NULL,NULL,,NULL
12,NULL,NULL,NULL,,NULL
The automated SQL looks something like:
LOAD DATA LOCAL INFILE ''C:\\Users\\MyComputer\\Documents\\members.csv'' INTO TABLE `members` FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'
No matter what I try (including the replace option), I continue to get the above resulting null data imported and not the actual data. Does anyone know how to get the data into my database?