我尝试在我的数据库表中使用“LOAD DATA INFILE”函数导入一个简单的昏迷分隔.txt文件,但是我收到此错误消息
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`;` LINES TERMINATED `\r\n`
这是我的LOAD DATA功能:
LOAD DATA LOCAL INFILE 'C:/IMPORT/donnees.txt' INTO TABLE titres_csc FIELDS TERMINATED BY ';' LINES TERMINATED '\r\n' IGNORE 1 LINES;
这是昏迷分隔符txt文件:
ID_Titre; Num_Lot_CSC; Date_Lot_CSC; Num_Client; Type_Titre; Num_Carnet; Num_Titre; Mt_Titre; Num_Adresse_Livraison; Millesime; Type_Carnet;服务; Num_Cde_Client; Date_Cde_Client;Intitulé_1;intitulé_2; Nom_contact_1; Nom_contact_2; Lig_Adr1; Lig_Adr2; Lig_Adr3; Lig_Adr4; Lig_Adr5; Zone_Geo ; Type_anomalie; Code_anomalie; Date_Fab; Num_colis; Date_Liv; Utilisateur; Num_imprimante1; Num_imprimante2 1; 12556613; 20131209; 123456789; Repas; 1; 1; 1400 ;; 2014; 20; ressource humaine; 1234567890123 ;;GieChèquesServicesCalédoniens; 98 800 NOUMEA; Florence MARAYE; Jacques MERCADAL; 14,rue des cerises; Magenta; 98 800 NOUMEA ;;; Noumea ;;;;;;;; 2; 12556613; 20131209; 123456790; Repas; 1; 2; 1400 ;; 2014; 20; ressource humaine; 1234567890123 ;;GieChèquesServicesCalédoniens; 98 800 NOUMEA; Florence MARAYE; Jacques MERCADAL; 14,rue des cerises; Magenta; 98 800 NOUMEA ;;; Noumea ;;;;;;;; 3; 12556613; 20131209; 123456790; Repas; 1; 3; 1400 ;; 2014; 20; ressource humaine; 1234567890123 ;;GieChèquesServicesCalédoniens; 98 800 NOUMEA; Florence MARAYE; Jacques MERCADAL; 14,rue des cerises; Magenta; 98 800 NOUMEA ;;; Noumea ;;;;;;;;
似乎是FIELDS TERMINATED BY函数无效,但是参考MySQL文档,这段代码是正确的。
感谢您的帮助!