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
44b8ec3d
Commit
44b8ec3d
authored
5 years ago
by
Laurent Lecluse
Browse files
Options
Downloads
Patches
Plain Diff
Correctif provisoire pour bypasser le bug tbl_pj / oracle 12
parent
5127ff92
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
data/ddl.php
+2
-55
2 additions, 55 deletions
data/ddl.php
with
2 additions
and
55 deletions
data/ddl.php
+
2
−
55
View file @
44b8ec3d
...
...
@@ -30636,62 +30636,9 @@ END UNICAEN_TBL;',
USING (
SELECT
tv.*
FROM
(SELECT
annee_id,
type_piece_jointe_id,
intervenant_id,
demandee,
fournie,
validee,
heures_pour_seuil,
obligatoire,
date_archive
FROM (
SELECT
COALESCE( pjd.annee_id, pjf.annee_id ) annee_id,
COALESCE( pjd.type_piece_jointe_id, pjf.type_piece_jointe_id ) type_piece_jointe_id,
COALESCE( pjd.intervenant_id, pjf.intervenant_id ) intervenant_id,
CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee,
CASE WHEN pjf.fichier = pjf.count THEN 1 ELSE 0 END fournie,
CASE WHEN pjf.validation = pjf.count THEN 1 ELSE 0 END validee,
COALESCE(pjd.heures_pour_seuil,0) heures_pour_seuil,
COALESCE(pjd.obligatoire,1) obligatoire,
pjf.date_archive date_archive,
rank() over (partition by pjd.annee_id, pjd.code_intervenant, pjd.type_piece_jointe_id order by pjf.annee_id DESC) rank1
FROM
tbl_piece_jointe_demande pjd
FULL JOIN (
SELECT
pjf.annee_id,
pjf.type_piece_jointe_id,
pjf.intervenant_id,
pjf.code_intervenant,
pjf.date_validite,
pjf.duree_vie,
pjf.date_archive,
COUNT(*) count,
SUM(CASE WHEN validation_id IS NULL THEN 0 ELSE 1 END) validation,
SUM(CASE WHEN fichier_id IS NULL THEN 0 ELSE 1 END) fichier
*
FROM
tbl_piece_jointe_fournie pjf
GROUP BY
pjf.annee_id,
pjf.intervenant_id,
pjf.code_intervenant,
pjf.type_piece_jointe_id,
pjf.date_validite,
pjf.duree_vie,
pjf.date_archive
) pjf
ON pjf.type_piece_jointe_id = pjd.type_piece_jointe_id
AND pjd.code_intervenant = pjf.code_intervenant
AND pjd.annee_id BETWEEN pjf.annee_id AND (pjf.annee_id + pjf.duree_vie - 1)
AND pjd.annee_id BETWEEN pjf.annee_id AND NVL(pjf.date_archive - 1,(pjf.annee_id + pjf.duree_vie - 1))
) t
WHERE
t.rank1 = 1) tv
v_tbl_piece_jointe
WHERE
\' || conds || \'
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