Commit 41dba204 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Affinage de la MV_INTERVENANT.sql pour eviter de créer des statuts autres pour les doctorants.

parent 8bc7235b
......@@ -40,6 +40,7 @@ WITH i AS (
COALESCE(inds.d_fin, to_date('01/01/9999', 'dd/mm/YYYY')) validite_fin
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)
WHERE inds.d_debut - 184 <= SYSDATE
--On ne remonte pas de statut autre pour ceux qui ont déjà un certain type de contrat
......@@ -49,6 +50,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 (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