Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
77710355
Commit
77710355
authored
Sep 28, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/Connecteurs-Import/Octopus/MV_INTERVENANT.sql
View file @
77710355
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment