Merge commit 'origin/master' into fusionax
[platal.git] / modules / fusionax / Formations.sql
CommitLineData
b9ad0878
PC
1-- Import complet des formations
2
3DROP TABLE IF EXISTS `fusionax_formations`;
4
5CREATE TABLE IF NOT EXISTS `fusionax_formations` (
22f043e4
SJ
6 `FO` CHAR(2) NOT NULL COMMENT 'Vaut toujours FO pour cette table',
7 `id_ancien` VARCHAR(8) NOT NULL COMMENT 'Id unique de l''ancien',
73be4434 8 `Intitule_formation` VARCHAR(60) collate utf8_general_ci NOT NULL COMMENT 'Intitulé de la formation',
b9ad0878
PC
9 `Date_maj` DATE NOT NULL COMMENT 'Date de mise à jour de ces informations',
10 PRIMARY KEY (`id_ancien`, `Intitule_formation`)
73be4434 11) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
b9ad0878
PC
12
13LOAD DATA LOCAL INFILE 'Formations.txt' INTO TABLE `fusionax_formations` FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n'
14(FO, id_ancien, Intitule_formation, @StringDate_maj)
15SET
16`Date_maj` = CONCAT(SUBSTRING(@StringDate_maj,7),'-',SUBSTRING(@StringDate_maj,4,2),'-',SUBSTRING(@StringDate_maj,1,2));