Commit c2889f22 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction sur SRC octopus

parent f8f89f45
Loading
Loading
Loading
Loading
+5 −4
Changes for doc/Connecteurs Import/Octopus/SRC_AFFECTATION_RECHERCHE.sql: 5 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -12,14 +12,15 @@ WITH affectation_recherche AS (
 		indaff.type_id = 3--Uniquement les affectations de type recherche
 		AND SYSDATE BETWEEN indaff.date_debut AND COALESCE(indaff.date_fin + 1, SYSDATE)
 )
SELECT i.id                                                           intervenant_id,
       s2.id                                                          structure_id,
SELECT DISTINCT i.id                intervenant_id,
                s.id                structure_id,
                src.id              source_id,
       affrech.source_code || '_' || unicaen_import.get_current_annee source_code,
                i.id || '_' || s.id source_code,
                s2.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.structure_recherche@octoprod sr ON sr.id = affrech.z_structure_recherche_id
         LEFT JOIN octo.v_structure@octoprod s2 ON sr.structure_id = s2.id
 No newline at end of file
         JOIN octo.v_structure@octoprod s2 ON sr.structure_id = s2.id
         JOIN structure s ON s2.code = s.source_code;
 No newline at end of file
+1 −1
Changes for doc/Connecteurs Import/Octopus/SRC_HARPEGE_STRUCTURE_CODES.sql: 1 added line, 1 removed line.
Original line number Diff line number Diff line
CREATE
OR REPLACE VIEW SRC_HARPEGE_STRUCTURE_CODES AS
SELECT vs.code  c_structure,
       vs2.code c_structuren2
       vs2.code c_structure_n2
FROM octo.v_structure@octoprod vs
         JOIN octo.v_structure@octoprod vs2 ON vs.niv2_id = vs2.id
WHERE vs.racine_id = (SELECT id FROM octo.v_structure@octoprod WHERE code = 'UNIV')
 No newline at end of file