Subversion Repositories eFlore/Applications.coel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1467 jpm 1
UPDATE coel_meta_historique_ligne SET cmhl_ce_table = 107
2
WHERE cmhl_ce_table = 102
3
	AND cmhl_cle_ligne NOT LIKE '%-%';
4
 
5
UPDATE coel_meta_historique_ligne SET cmhl_cle_ligne = CONCAT_WS('-',
6
	IF (ExtractValue(cmhl_enregistrement, '//csap_id_personne') = '', 0, ExtractValue(cmhl_enregistrement, '//csap_id_personne')),
7
	ExtractValue(cmhl_enregistrement, '//csap_id_role'),
8
	ExtractValue(cmhl_enregistrement, '//csap_id_structure')
9
	)
10
WHERE cmhl_ce_table = 121
11
  AND cmhl_ce_etat = 1;
12
 
13
UPDATE coel_meta_historique_ligne SET cmhl_cle_ligne = CONCAT_WS('-',
14
	SUBSTRING_INDEX(cmhl_cle_ligne, '-', 1),  # Premier
15
	SUBSTRING_INDEX(cmhl_cle_ligne, '-', -1), # Dernier
16
	SUBSTRING_INDEX(SUBSTRING_INDEX(cmhl_cle_ligne, '-', 2), '-', -1)# Milieu
17
	)
18
WHERE cmhl_ce_table = 121
19
  AND cmhl_ce_etat = 2;
20
 
21
UPDATE coel_meta_historique_ligne SET cmhl_cle_ligne = CONCAT_WS('-',
22
	SUBSTRING_INDEX(SUBSTRING_INDEX(cmhl_cle_ligne, '-', 2), '-', -1), # Milieu
23
	SUBSTRING_INDEX(cmhl_cle_ligne, '-', -1), # Dernier
24
	SUBSTRING_INDEX(cmhl_cle_ligne, '-', 1)  # Premier
25
	)
26
WHERE cmhl_ce_table = 121
27
  AND cmhl_ce_etat = 3;