9,7 → 9,7 |
/* |
-- SELECT id_observation, b.num_nom, CONCAT(b.nom_sci, ' ', b.auteur), b.num_taxonomique, b.famille |
SELECT id_observation, nom_ret, nom_ret_nn, nt, c.famille |
FROM tb_cel.cel_obs c, tb_eflore.bdtfx_v1_02 b |
FROM tb_cel.cel_obs c, tb_eflore.bdtfx_v1_01 b |
WHERE ( |
nom_sel_nn IS NOT NULL AND nom_sel_nn != 0 |
AND nom_referentiel like 'bdtfx%' |
19,7 → 19,7 |
*/ |
|
--- l'update --- |
UPDATE tb_cel.cel_obs c, tb_eflore.bdtfx_v1_02 b SET |
UPDATE tb_cel.cel_obs c, tb_eflore.bdtfx_v1_01 b SET |
c.nom_ret = CONCAT(b.nom_sci, ' ', b.auteur), |
c.nom_ret_nn = b.num_nom, |
c.nt = b.num_taxonomique, |
28,9 → 28,13 |
nom_sel_nn IS NOT NULL AND nom_sel_nn != 0 |
AND nom_referentiel like 'bdtfx%' |
AND nom_sel_nn = num_nom |
AND LOWER(c.famille) = LOWER(b.famille) |
AND SUBSTRING_INDEX(c.nom_sel, ' ', 1) = SUBSTRING_INDEX(b.nom_sci, ' ', 1) |
); |
-- 31739 |
-- 31739 sans les restrictions sur famille et SUBSTRING_INDEX() |
-- 31524 avec les restrictions sur famille et SUBSTRING_INDEX() |
|
|
UPDATE tb_cel.cel_obs c, tb_eflore.bdtxa_v1_00 a SET |
c.nom_ret = CONCAT(a.nom_sci, ' ', a.auteur), |
c.nom_ret_nn = a.num_nom, |
40,5 → 44,41 |
nom_sel_nn IS NOT NULL AND nom_sel_nn != 0 |
AND nom_referentiel like 'bdtxa%' |
AND nom_sel_nn = num_nom |
AND LOWER(c.famille) = LOWER(a.famille) |
AND SUBSTRING_INDEX(c.nom_sel, ' ', 1) = SUBSTRING_INDEX(a.nom_sci, ' ', 1) |
); |
-- 49 |
-- 49 sans les restrictions sur famille et SUBSTRING_INDEX() |
-- 47 avec les restrictions sur famille et SUBSTRING_INDEX() |
|
UPDATE tb_cel.cel_obs c, tb_eflore.isfan_v2013 a SET |
c.nom_ret = CONCAT(a.nom_sci, ' ', a.auteur), |
c.nom_ret_nn = a.num_nom, |
c.nt = a.num_taxonomique, |
c.famille = a.famille |
WHERE ( |
nom_sel_nn IS NOT NULL AND nom_sel_nn != 0 |
AND nom_referentiel like 'isfan%' |
AND nom_sel_nn = num_nom |
); |
|
|
/* |
Pour observer les différences: |
wdiff -w '$(tput bold;tput setaf 1)' -x '$(tput sgr0)' -y '$(tput bold;tput setaf 2)' -z '$(tput sgr0)' pre.log post.log | \ |
ansi2html.sh --palette=solarized | \ |
sed '/^[0-9]/{/span/!d}' > diff.html |
|
# extract les familles ayant changé: sed '/^[0-9]/{/<\/span>$/!d}' |
# lowercase toutes les familles: awk '{ NF=tolower($NF); print }' |
|
|
# filtre sed: changements de famille "normaux" |
/aceraceae.*sapindaceae/d |
/scrophulariaceae.*plantaginaceae/d |
/globulariaceae.*plantaginaceae/d |
/Famille inconnue.*null/d |
|
# changement "anormaux" |
/rosaceae.*caprifoliaceae/d |
/valerianaceae.*caprifoliaceae/d |
*/ |