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

Adaptation de la MV_INTERVENANT.sql pour qu'un statut de permanent n'ait pas de statut 'Autre'.

parent 1919be13
......@@ -29,7 +29,7 @@ WITH i AS (
JOIN octo.v_individu_statut@octoprod vinds ON vinds.individu_id = uni.c_individu_chaine
WHERE icto.d_debut - 184 <= SYSDATE
WHERE icto.d_debut - 184 <= SYSDATE AND icto.code_ose IS NOT NULL
UNION ALL
-- Step 2 : on prend tout le reste potentiel vacataire, notamment les hébergés
......@@ -48,7 +48,7 @@ WITH i AS (
FROM octo.individu_unique@octoprod uni
JOIN octo.individu_statut@octoprod inds ON inds.individu_id = uni.c_individu_chaine
LEFT JOIN octo.v_individu_statut@octoprod vinds ON vinds.individu_id = uni.c_individu_chaine
LEFT JOIN octo.v_individu_contrat_type_ose@octoprod icto ON uni.c_individu_chaine = icto.individu_id AND (icto.code_ose IN('DOCTOR') AND icto.d_debut - 184 <= SYSDATE)
LEFT JOIN octo.v_individu_contrat_type_ose@octoprod icto ON uni.c_individu_chaine = icto.individu_id AND icto.d_debut - 184 <= SYSDATE AND icto.code_ose IS NOT NULL
WHERE inds.d_debut - 184 <= SYSDATE
--On ne remonte pas de statut autre pour ceux qui ont déjà un certain type de contrat
--AND icto.individu_id IS NULL
......@@ -57,6 +57,7 @@ WITH i AS (
OR (inds.t_enseignant = 'O' AND inds.t_heberge = 'O')
OR (inds.t_vacataire = 'O')
OR (inds.t_heberge = 'O'))
AND icto.individu_id IS NULL
AND (vinds.t_doctorant='N' OR vinds.individu_id IS NULL)
AND inds.c_source IN ('HARP', 'OCTO', 'SIHAM')
) t
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment