Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
6d2975cb
Commit
6d2975cb
authored
Jun 23, 2020
by
Antony Le Courtes
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#29825
#30278
parent
292bffd2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/ddl/package/UNICAEN_TBL/body.sql
+4
-2
4 additions, 2 deletions
data/ddl/package/UNICAEN_TBL/body.sql
data/ddl/view/V_TBL_AGREMENT.sql
+4
-2
4 additions, 2 deletions
data/ddl/view/V_TBL_AGREMENT.sql
with
8 additions
and
4 deletions
data/ddl/package/UNICAEN_TBL/body.sql
+
4
−
2
View file @
6d2975cb
...
@@ -323,7 +323,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
...
@@ -323,7 +323,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
(WITH i_s AS (
(WITH i_s AS (
SELECT
SELECT
fr.intervenant_id,
fr.intervenant_id,
ep.structure_id
ep.structure_id
ep_structure_id
FROM
FROM
formule_resultat fr
formule_resultat fr
JOIN type_volume_horaire tvh ON tvh.code =
''
PREVU
''
AND tvh.id = fr.type_volume_horaire_id
JOIN type_volume_horaire tvh ON tvh.code =
''
PREVU
''
AND tvh.id = fr.type_volume_horaire_id
...
@@ -410,7 +410,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
...
@@ -410,7 +410,7 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
NVL(a.id, avi.agrement_id) agrement_id,
NVL(a.id, avi.agrement_id) agrement_id,
tas.duree_vie duree_vie,
tas.duree_vie duree_vie,
RANK() OVER(
RANK() OVER(
PARTITION BY i.code,i.annee_id ORDER BY
PARTITION BY i.code,i.annee_id
,i_s.ep_structure_id
ORDER BY
CASE
CASE
WHEN NVL(NVL(a.id, avi.agrement_id),0) = 0
WHEN NVL(NVL(a.id, avi.agrement_id),0) = 0
THEN NULL
THEN NULL
...
@@ -427,11 +427,13 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
...
@@ -427,11 +427,13 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
JOIN i_s ON i_s.intervenant_id = i.id
JOIN i_s ON i_s.intervenant_id = i.id
LEFT JOIN agrement a ON a.type_agrement_id = ta.id
LEFT JOIN agrement a ON a.type_agrement_id = ta.id
AND a.structure_id = i_s.ep_structure_id
AND a.intervenant_id = i.id
AND a.intervenant_id = i.id
AND a.histo_destruction IS NULL
AND a.histo_destruction IS NULL
LEFT JOIN avi ON i.code = avi.code_intervenant
LEFT JOIN avi ON i.code = avi.code_intervenant
AND tas.type_agrement_id = avi.type_agrement
AND tas.type_agrement_id = avi.type_agrement
AND a.id = avi.agrement_id
AND i.annee_id < avi.date_validite
AND i.annee_id < avi.date_validite
AND i.annee_id >= avi.annee_id
AND i.annee_id >= avi.annee_id
...
...
This diff is collapsed.
Click to expand it.
data/ddl/view/V_TBL_AGREMENT.sql
+
4
−
2
View file @
6d2975cb
...
@@ -2,7 +2,7 @@ CREATE OR REPLACE FORCE VIEW V_TBL_AGREMENT AS
...
@@ -2,7 +2,7 @@ CREATE OR REPLACE FORCE VIEW V_TBL_AGREMENT AS
WITH
i_s
AS
(
WITH
i_s
AS
(
SELECT
SELECT
fr
.
intervenant_id
,
fr
.
intervenant_id
,
ep
.
structure_id
ep
.
structure_id
ep_structure_id
FROM
FROM
formule_resultat
fr
formule_resultat
fr
JOIN
type_volume_horaire
tvh
ON
tvh
.
code
=
'PREVU'
AND
tvh
.
id
=
fr
.
type_volume_horaire_id
JOIN
type_volume_horaire
tvh
ON
tvh
.
code
=
'PREVU'
AND
tvh
.
id
=
fr
.
type_volume_horaire_id
...
@@ -89,7 +89,7 @@ SELECT DISTINCT "ANNEE_ID","ANNEE_AGREMENT","TYPE_AGREMENT_ID","INTERVENANT_ID",
...
@@ -89,7 +89,7 @@ SELECT DISTINCT "ANNEE_ID","ANNEE_AGREMENT","TYPE_AGREMENT_ID","INTERVENANT_ID",
NVL
(
a
.
id
,
avi
.
agrement_id
)
agrement_id
,
NVL
(
a
.
id
,
avi
.
agrement_id
)
agrement_id
,
tas
.
duree_vie
duree_vie
,
tas
.
duree_vie
duree_vie
,
RANK
()
OVER
(
RANK
()
OVER
(
PARTITION
BY
i
.
code
,
i
.
annee_id
ORDER
BY
PARTITION
BY
i
.
code
,
i
.
annee_id
,
i_s
.
ep_structure_id
ORDER
BY
CASE
CASE
WHEN
NVL
(
NVL
(
a
.
id
,
avi
.
agrement_id
),
0
)
=
0
WHEN
NVL
(
NVL
(
a
.
id
,
avi
.
agrement_id
),
0
)
=
0
THEN
NULL
THEN
NULL
...
@@ -106,11 +106,13 @@ SELECT DISTINCT "ANNEE_ID","ANNEE_AGREMENT","TYPE_AGREMENT_ID","INTERVENANT_ID",
...
@@ -106,11 +106,13 @@ SELECT DISTINCT "ANNEE_ID","ANNEE_AGREMENT","TYPE_AGREMENT_ID","INTERVENANT_ID",
JOIN
i_s
ON
i_s
.
intervenant_id
=
i
.
id
JOIN
i_s
ON
i_s
.
intervenant_id
=
i
.
id
LEFT
JOIN
agrement
a
ON
a
.
type_agrement_id
=
ta
.
id
LEFT
JOIN
agrement
a
ON
a
.
type_agrement_id
=
ta
.
id
AND
a
.
structure_id
=
i_s
.
ep_structure_id
AND
a
.
intervenant_id
=
i
.
id
AND
a
.
intervenant_id
=
i
.
id
AND
a
.
histo_destruction
IS
NULL
AND
a
.
histo_destruction
IS
NULL
LEFT
JOIN
avi
ON
i
.
code
=
avi
.
code_intervenant
LEFT
JOIN
avi
ON
i
.
code
=
avi
.
code_intervenant
AND
tas
.
type_agrement_id
=
avi
.
type_agrement
AND
tas
.
type_agrement_id
=
avi
.
type_agrement
AND
a
.
id
=
avi
.
agrement_id
AND
i
.
annee_id
<
avi
.
date_validite
AND
i
.
annee_id
<
avi
.
date_validite
AND
i
.
annee_id
>=
avi
.
annee_id
AND
i
.
annee_id
>=
avi
.
annee_id
...
...
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