Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
ea014e13
Commit
ea014e13
authored
3 years ago
by
Antony Le Courtes
Browse files
Options
Downloads
Patches
Plain Diff
Adaptation MV_INTERVENANT.sql et statut autre...
parent
0a6e15d4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/Connecteurs-Import/Octopus/MV_INTERVENANT.sql
+10
-8
10 additions, 8 deletions
doc/Connecteurs-Import/Octopus/MV_INTERVENANT.sql
with
10 additions
and
8 deletions
doc/Connecteurs-Import/Octopus/MV_INTERVENANT.sql
+
10
−
8
View file @
ea014e13
...
...
@@ -22,15 +22,17 @@ WITH i AS (
ELSE
'vacataire'
END
z_type
,
icto
.
id_orig
source_code
,
COALESCE
(
icto
.
d_debut
,
to_date
(
'01/01/1900'
,
'dd/mm/YYYY'
))
validite_debut
,
COALESCE
(
icto
.
d_fin
,
to_date
(
'01/01/9999'
,
'dd/mm/YYYY'
))
validite_fin
,
CASE
WHEN
icto
.
d_fin
=
to_date
(
'01/09/2021'
,
'dd/mm/YYYY'
)
THEN
to_date
(
'31/08/2021'
,
'dd/mm/YYYY'
)
ELSE
COALESCE
(
icto
.
d_fin
,
to_date
(
'01/01/9999'
,
'dd/mm/YYYY'
))
END
validite_fin
,
NULL
fin_affectation_siham
FROM
octo
.
v_individu_contrat_type_ose
@
octoprod
icto
JOIN
octo
.
individu_unique
@
octoprod
uni
ON
icto
.
individu_id
=
uni
.
c_individu_chaine
JOIN
octo
.
v_individu_statut
@
octoprod
vinds
ON
vinds
.
individu_id
=
uni
.
c_individu_chaine
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
SELECT
uni
.
c_individu_chaine
code
,
...
...
@@ -40,7 +42,9 @@ WITH i AS (
ELSE
'vacataire'
END
z_type
,
uni
.
c_individu_chaine
||
'-autre'
source_code
,
COALESCE
(
inds
.
d_debut
,
to_date
(
'01/01/1900'
,
'dd/mm/YYYY'
))
validite_debut
,
COALESCE
(
inds
.
d_fin
,
to_date
(
'01/01/9999'
,
'dd/mm/YYYY'
))
validite_fin
,
CASE
WHEN
inds
.
d_fin
=
to_date
(
'01/09/2021'
,
'dd/mm/YYYY'
)
THEN
to_date
(
'31/08/2021'
,
'dd/mm/YYYY'
)
ELSE
COALESCE
(
inds
.
d_fin
,
to_date
(
'01/01/9999'
,
'dd/mm/YYYY'
))
END
validite_fin
,
CASE
WHEN
inds
.
c_source
=
'SIHAM'
THEN
inds
.
d_fin
ELSE
NULL
END
fin_affectation_siham
...
...
@@ -58,7 +62,7 @@ WITH i AS (
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 (vinds.t_doctorant='N' OR vinds.individu_id IS NULL)
AND
inds
.
c_source
IN
(
'HARP'
,
'OCTO'
,
'SIHAM'
)
)
t
),
...
...
@@ -278,5 +282,3 @@ FROM i
--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
))
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment