Bonsoir,
J'ai une requête qui me permet de récupérer des informations (statuts de protections) sur des espèces.
Cette requête retourne les bonnes informations sauf qu'au lieu d'avoir une ligne avec les différentes informations, j'ai autant de ligne par espèce.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 SELECT a.tao_id_taxon, b.sta_nom_statut AS statut_uicn_fc, b1.sta_nom_statut AS statut_uicn_fr, b2.sta_nom_statut AS statut_uicn_monde, b3.sta_nom_statut AS statut_det_znieff, b4.sta_nom_statut AS statut_cat_patrimoniale, b5.sta_nom_statut AS statut_code_atlas, b6.sta_nom_statut AS statut_sp_invasive, b7.sta_nom_statut AS statut_sp_grand_territoire, b8.sta_nom_statut AS statut_orgfh, b9.sta_nom_statut AS statut_biologique, b10.sta_nom_statut AS statut_uicn_fr_hivernant, b11.sta_nom_statut AS statut_uicn_fr_passage FROM t_taxon_observe a JOIN tj_taxon_a_statut f ON a.tao_id_taxon = f.tao_id_taxon LEFT OUTER JOIN tr_statut b ON f.sta_id_statut = b.sta_id_statut AND b.tst_id_type_statut = 33 LEFT OUTER JOIN tr_statut b1 ON f.sta_id_statut = b1.sta_id_statut AND b1.tst_id_type_statut = 23 LEFT OUTER JOIN tr_statut b2 ON f.sta_id_statut = b2.sta_id_statut AND b2.tst_id_type_statut = 31 LEFT OUTER JOIN tr_statut b3 ON f.sta_id_statut = b3.sta_id_statut AND b3.tst_id_type_statut = 24 LEFT OUTER JOIN tr_statut b4 ON f.sta_id_statut = b4.sta_id_statut AND b4.tst_id_type_statut = 39 LEFT OUTER JOIN tr_statut b5 ON f.sta_id_statut = b5.sta_id_statut AND b5.tst_id_type_statut = 45 LEFT OUTER JOIN tr_statut b6 ON f.sta_id_statut = b6.sta_id_statut AND b6.tst_id_type_statut = 46 LEFT OUTER JOIN tr_statut b7 ON f.sta_id_statut = b7.sta_id_statut AND b7.tst_id_type_statut = 47 LEFT OUTER JOIN tr_statut b8 ON f.sta_id_statut = b8.sta_id_statut AND b8.tst_id_type_statut = 48 LEFT OUTER JOIN tr_statut b9 ON f.sta_id_statut = b9.sta_id_statut AND b9.tst_id_type_statut = 49 LEFT OUTER JOIN tr_statut b10 ON f.sta_id_statut = b10.sta_id_statut AND b10.tst_id_type_statut = 50 LEFT OUTER JOIN tr_statut b11 ON f.sta_id_statut = b11.sta_id_statut AND b11.tst_id_type_statut = 52 order by tao_id_taxon
Je voudrais fusionner les informations par l'identifiant tao_id_taxontao_id_taxon | statut_uicn_fc | statut_uicn_fr | statut_uicn_monde 87479 "LC" "" "" 87479 "" "LC" "" 87479 "" "" "LC"
La question est donc la suivante : comment faire ?87479;"Lc";"LC";"LC"
Par avance, merci de votre aide.
En PJ, le MCD et le MPD
Partager