Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 756 | Rev 780 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 756 Rev 760
Line 19... Line 19...
19
 
19
 
20
DROP TEMPORARY TABLE IF EXISTS T_bis;
20
DROP TEMPORARY TABLE IF EXISTS T_bis;
Line 21... Line 21...
21
DROP PROCEDURE IF EXISTS majreferentiel;
21
DROP PROCEDURE IF EXISTS majreferentiel;
22
 
22
 
23
CREATE TEMPORARY TABLE IF NOT EXISTS T_bis ( INDEX(`nom`(30))) AS \
23
CREATE TEMPORARY TABLE IF NOT EXISTS T_bis ( INDEX(`nom`(30))) AS \
Line 24... Line 24...
24
           SELECT "bdtfx" AS valid_ref, CONCAT(b.nom_sci, ' ', b.auteur) AS nom, b.num_nom, b.num_taxonomique, b.famille FROM tb_eflore.bdtfx_v1_02 b UNION ALL \
24
           SELECT "bdtfx" AS valid_ref, CONCAT(b.nom_sci, ' ', b.auteur) AS nom, b.num_nom, b.num_taxonomique, b.famille FROM tb_eflore.bdtfx_v1_01 b UNION ALL \
25
           SELECT "bdtxa" AS valid_ref, CONCAT(a.nom_sci, ' ', a.auteur) AS nom, a.num_nom, a.num_tax, a.famille FROM tb_eflore.bdtxa_v1_00 a;
25
           SELECT "bdtxa" AS valid_ref, CONCAT(a.nom_sci, ' ', a.auteur) AS nom, a.num_nom, a.num_tax, a.famille FROM tb_eflore.bdtxa_v1_00 a;
26
 
26
 
27
/* Donc nous JOINons:
27
/* Donc nous JOINons:
28
-- INNER JOIN sur bdtfx: 69719
28
-- INNER JOIN sur bdtfx: 69719
29
SELECT id_observation, nom_referentiel, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, c.famille FROM cel_obs c INNER JOIN tb_eflore.bdtfx_v1_02 b ON (b.num_nom = c.nom_sel_nn) WHERE (nom_referentiel IS NULL OR nom_referentiel = '') AND nom_sel_nn IS NOT NULL;
29
SELECT id_observation, nom_referentiel, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, c.famille FROM cel_obs c INNER JOIN tb_eflore.bdtfx_v1_01 b ON (b.num_nom = c.nom_sel_nn) WHERE (nom_referentiel IS NULL OR nom_referentiel = '') AND nom_sel_nn IS NOT NULL;
Line 30... Line 30...
30
-- INNER JOIN sur bdtxa: 79471 dont 9752 en dup (bdtxa + bdtfx), eg: 1005047
30
-- INNER JOIN sur bdtxa: 79471 dont 9752 en dup (bdtxa + bdtfx), eg: 1005047