Commit 00dff5dd authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

correction affectation recherche venant d'octopus

parent d3a73ff6
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -4,8 +4,9 @@ WITH affectation_recherche AS (
 	SELECT
 		indaff.individu_id           z_code,
 		s.id     					 z_structure_recherche_id,
 		indaff.id                    source_code
 	from
 		indaff.id                    source_code,
 		s.code                       code
 	FROM
 		octo.individu_affectation@octoprod indaff
 	    JOIN octo.v_structure@octoprod s ON s.id = indaff.structure_id
 	WHERE
@@ -20,5 +21,8 @@ SELECT DISTINCT i.id intervenant_id,
                s.libelle_court     labo_libelle
FROM affectation_recherche affrech
         JOIN source src ON src.code = 'Octopus'
         JOIN intervenant i ON i.code = CAST(affrech.z_code AS varchar(255))  AND i.annee_id = unicaen_import.get_current_annee
         JOIN octo.v_structure@octoprod s ON affrech.z_structure_recherche_id = s.id
 No newline at end of file
         JOIN intervenant i
              ON i.code = CAST(affrech.z_code AS varchar(255)) AND i.annee_id = unicaen_import.get_current_annee
         JOIN structure s ON s.code = affrech.code