Re: Fatal error encountered attempting to read the resultset.
Hi,
in your sample entry
BRCOL-CORE-A,0,2000000533586F00,1,0,9/17/12 8:45 PM,304,6527.82,24454.09,30981.9013,11.34,46.27,57.602,10.27,29.19,1.778,1.937,1.904,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.4,5.71,3.55,0.0,0.0,0.0,0.0
if that is in the first row, it will be ignored, because the clause "IGNORE 1 LINES "
I was looking into the code and found other issues, first "Port" column appears twice in create table, so stmt cannot be executed as is.
removing first definition of port in create you can run the load data like this
LOAD DATA LOCAL INFILE 'D:\\src\\ForumIssues\\LoadDataInfile\\input.txt' INTO TABLE By_Switch FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\r\\n'
That should work.
Also a good way to find out the right format for the CSV file is to run a couple of statements like:
insert into By_Switch select 'BRCOL-CORE-A',0,'2000000533586F00',1,0,'9/17/12 8:45 PM',304,6527.82,24454.09,30981.9013,11.34,46.27,57.602,10.27,29.19,1.778,1.937,1.904,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.4,5.71,3.55,0.0,0.0,0.0,0.0
select * from By_Switch into outfile 'D:\\src\\ForumIssues\\LoadDataInfile\\output.txt'
Thanks.