X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Ffusionax%2FFormations.sql;h=c2b09f6039bbc79da4bc1cab3acbf1b717d9a344;hb=f74509fbb4f06820dc3d028e3ffd2145f151b013;hp=7d2854a8a51e7476fc88659041e5e08a654460e4;hpb=b9ad087851ce4a09236f64f67d15fdaf29e38cf0;p=platal.git diff --git a/modules/fusionax/Formations.sql b/modules/fusionax/Formations.sql index 7d2854a..c2b09f6 100644 --- a/modules/fusionax/Formations.sql +++ b/modules/fusionax/Formations.sql @@ -3,14 +3,18 @@ DROP TABLE IF EXISTS `fusionax_formations`; CREATE TABLE IF NOT EXISTS `fusionax_formations` ( - `FO` varbinary(2) NOT NULL COMMENT 'Vaut toujours FO pour cette table', - `id_ancien` varbinary(8) NOT NULL COMMENT 'Id unique de l''ancien', - `Intitule_formation` varchar(60) collate utf8_unicode_ci NOT NULL COMMENT 'Intitulé de la formation', - `Date_maj` DATE NOT NULL COMMENT 'Date de mise à jour de ces informations', - PRIMARY KEY (`id_ancien`, `Intitule_formation`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + FO CHAR(2) NOT NULL COMMENT 'Vaut toujours FO pour cette table', + id_ancien VARCHAR(8) NOT NULL COMMENT 'Id unique de l''ancien', + Intitule_diplome VARCHAR(60) collate utf8_general_ci NOT NULL COMMENT 'Intitulé du diplôme', + Intitule_formation VARCHAR(60) collate utf8_general_ci NOT NULL COMMENT 'Intitulé de la formation', + Descr_formation VARCHAR(60) collate utf8_general_ci NOT NULL COMMENT 'Description de la formation', + tmp_1 VARCHAR(60) collate utf8_general_ci NOT NULL, + tmp_2 VARCHAR(60) collate utf8_general_ci NOT NULL, + tmp_3 VARCHAR(60) collate utf8_general_ci NOT NULL, + tmp_4 VARCHAR(60) collate utf8_general_ci NOT NULL, + PRIMARY KEY (id_ancien, Intitule_diplome, Intitule_formation) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -LOAD DATA LOCAL INFILE 'Formations.txt' INTO TABLE `fusionax_formations` FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n' -(FO, id_ancien, Intitule_formation, @StringDate_maj) -SET -`Date_maj` = CONCAT(SUBSTRING(@StringDate_maj,7),'-',SUBSTRING(@StringDate_maj,4,2),'-',SUBSTRING(@StringDate_maj,1,2)); + LOAD DATA LOCAL INFILE 'Formations.txt' + INTO TABLE fusionax_formations +FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n' (FO, id_ancien, Intitule_diplome, Intitule_formation, Descr_formation, tmp_1, tmp_2, tmp_3, tmp_4);