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

Adaptation MV_INTERVENANT.sql suite nouvelle gestion et unification des...

Adaptation MV_INTERVENANT.sql suite nouvelle gestion et unification des comptes utilisateurs dans Octopus. Maintenant, un compte etudiant (eXXXXX) peut potentiellement servir lorsque l'étudiant devient vacataire.
parent b396048c
......@@ -145,14 +145,13 @@ WITH i AS (
(
SELECT
MAX(indc.individu_id) individu_id,
MAX(indc.ldap_uid) KEEP (DENSE_RANK FIRST ORDER BY indc.histo_creation) ldap_uid,
MAX(indc.email) KEEP (DENSE_RANK FIRST ORDER BY indc.histo_creation) email,
MAX(indc.histo_creation) KEEP (DENSE_RANK FIRST ORDER BY indc.histo_creation) histo_creation,
MAX(indc.ldap_uid) KEEP (DENSE_RANK FIRST ORDER BY CASE WHEN regexp_like(ldap_uid, 'e[0-9]{8}') THEN 1 ELSE 0 END, indc.histo_creation) ldap_uid,
MAX(indc.email) KEEP (DENSE_RANK FIRST ORDER BY CASE WHEN regexp_like(ldap_uid, 'e[0-9]{8}') THEN 1 ELSE 0 END,indc.histo_creation) email,
MAX(indc.histo_creation) KEEP (DENSE_RANK FIRST ORDER BY CASE WHEN regexp_like(ldap_uid, 'e[0-9]{8}') THEN 1 ELSE 0 END,indc.histo_creation) histo_creation,
MAX(vindcvc.date_fin) KEEP (DENSE_RANK FIRST ORDER BY vindcvc.date_fin DESC) date_fin
FROM octo.individu_compte@octoprod indc
JOIN octo.v_individu_cycle_vie_compte@octoprod vindcvc ON vindcvc.individu_id = indc.individu_id
WHERE not regexp_like(ldap_uid, 'e[0-9]{8}')
AND indc.statut_id = 1
WHERE indc.statut_id = 1
GROUP BY indc.individu_id
ORDER BY histo_creation ASC
)
......@@ -266,17 +265,4 @@ FROM i
LEFT JOIN compte ON compte.individu_id = induni.c_individu_chaine
--On récupére la discipline adaptée directement dans Octopus
LEFT JOIN cnua cnua ON cnua.individu_id = induni.c_individu_chaine
WHERE i.validite_fin >= (SYSDATE - (365 * 2))
WHERE i.validite_fin >= (SYSDATE - (365 * 2))
\ No newline at end of file
Markdown is supported
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