I am attempting to import a text file into a 2 field table using "load data infile".
This is the file:
"01","Atlantic"
"02","Bergen"
"03","Burlington"
"04","Camden"
"05","Cape May"
"06","Cumberland"
"07","Essex"
"08","Gloucester"
"09","Hudson"
"10","Hunterdon"
"11","Mercer"
"12","Middlesex"
"13","Monmouth"
"14","Morris"
"15","Ocean"
"16","Passaic"
"17","Salem"
"18","Somerset"
"19","Sussex"
"20","Union"
"21","Warren"
Each line is terminated by a carriage return and line feed.
this is the code
INTO TABLE countiestest
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\r\n'
This code results in: Error Code: 1083. Field separator argument is not what is expected; check the manual 0.000 sec
with ESCAPED BY '\r' I get a single record back
'01', 'Atlantic\"\n\"02'
with ESCAPED BY '\n' I get a single record back
'01', 'Atlantic\"\r\"02'
with ESCAPED BY '\\' I get
'1', '0', 'Berg', 'Burlington\"\r\n\"04'
'5', '0', 'Cumb', 'Essex\"\r\n\"08'
'9', '0', 'Hunt', 'Mercer\"\r\n\"12'
'13', '0', 'Morr', 'Ocean\"\r\n\"16'
'17', '0', 'Some', 'Sussex\"\r\n\"20'
'21', '0', '', ''
Dose anybody have a clue what is going on here?
Bill Cook
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.