Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 756 | Rev 769 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 756 Rev 760
1
-- date d'observation dans le futur
1
-- date d'observation dans le futur
2
UPDATE cel_obs SET date_observation = NULL WHERE date_observation > now();
2
UPDATE cel_obs SET date_observation = NULL WHERE date_observation > now();
3
-- cleanup
3
-- cleanup
4
UPDATE cel_obs SET date_observation = NULL WHERE date_observation = '0000-00-00 00:00:00';
4
UPDATE cel_obs SET date_observation = NULL WHERE date_observation = '0000-00-00 00:00:00';
5
-- cleanup
5
-- cleanup
6
UPDATE cel_obs SET latitude = NULL, longitude = NULL WHERE longitude = 0 and latitude = 0;
6
UPDATE cel_obs SET latitude = NULL, longitude = NULL WHERE longitude = 0 and latitude = 0;
7
 
7
 
8
-- referentiels: 65800 NULL, 13000 ''
8
-- referentiels: 65800 NULL, 13000 ''
9
UPDATE cel_obs SET nom_referentiel = SUBSTRING_INDEX(nom_referentiel, ':', 1);
9
UPDATE cel_obs SET nom_referentiel = SUBSTRING_INDEX(nom_referentiel, ':', 1);
10
UPDATE cel_obs SET nom_referentiel = 'bdtfx' WHERE nom_referentiel IN ('bdtfx_v1','bdnff');
10
UPDATE cel_obs SET nom_referentiel = 'bdtfx' WHERE nom_referentiel IN ('bdtfx_v1','bdnff');
11
-- TODO: UPDATE cel_obs SET nom_referentiel = NULL where nom_referentiel = '';
11
-- TODO: UPDATE cel_obs SET nom_referentiel = NULL where nom_referentiel = '';
12
 
12
 
13
-- suppression des infos générées pour les observations dont le nom_sel à été supprimé par l'utilisateur
13
-- suppression des infos générées pour les observations dont le nom_sel à été supprimé par l'utilisateur
14
-- 3172
14
-- 3172
15
UPDATE tb_cel.cel_obs c SET
15
UPDATE tb_cel.cel_obs c SET
16
       c.nom_ret = '',
16
       c.nom_ret = '',
17
       c.nom_sel_nn = NULL,
17
       c.nom_sel_nn = NULL,
18
       c.nom_ret = NULL,
18
       c.nom_ret = NULL,
19
       c.nom_ret_nn = NULL,
19
       c.nom_ret_nn = NULL,
20
       c.nt = NULL,
20
       c.nt = NULL,
21
       c.famille = NULL;
21
       c.famille = NULL;
22
       WHERE nom_sel = '' OR nom_sel IS NULL;
22
       WHERE nom_sel = '' OR nom_sel IS NULL;
-
 
23
 
-
 
24
-- problème n°1
-
 
25
UPDATE tb_cel.cel_obs SET nom_referentiel = 'bdtxa' WHERE lieudit = 'Grenade';