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
d0c475ee
You need to sign in or sign up before continuing.
Commit
d0c475ee
authored
4 years ago
by
Antony Le Courtes
Browse files
Options
Downloads
Patches
Plain Diff
Correction temporaire MV_INTERVENANT.sql suite problème de fiabilité des IBAN provenant de SIHAM.
parent
d8b9494c
Branches
Branches containing commit
Tags
3.0.2
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
+14
-2
14 additions, 2 deletions
doc/Connecteurs-Import/Octopus/MV_INTERVENANT.sql
with
14 additions
and
2 deletions
doc/Connecteurs-Import/Octopus/MV_INTERVENANT.sql
+
14
−
2
View file @
d0c475ee
...
...
@@ -118,6 +118,17 @@ WITH i AS (
AND
COALESCE
(
indg
.
d_debut
,
to_date
(
'01/01/1900'
,
'dd/mm/YYYY'
))
<
SYSDATE
--On retire temporairement les doubles grades des quelques individus (Historique harpege), à supprimer quand full siham
AND
indg
.
id
NOT
IN
(
8856
,
8904
,
9214
,
11735
,
12155
,
13166
,
14698
,
14731
,
14854
,
15143
,
15144
,
15201
,
15358
,
15359
,
15401
)
),
iban_dossier
AS
(
SELECT
i
.
code
,
MAX
(
REPLACE
(
d
.
iban
,
' '
,
''
))
iban
,
MAX
(
REPLACE
(
d
.
bic
,
' '
,
''
))
bic
FROM
intervenant
i
JOIN
intervenant_dossier
d
ON
d
.
intervenant_id
=
i
.
id
AND
d
.
histo_destruction
IS
null
WHERE
i
.
annee_id
=
2020
AND
i
.
histo_destruction
IS
NULL
AND
d
.
iban
IS
NOT
NULL
AND
d
.
rib_hors_sepa
=
0
AND
i
.
source_id
=
'24'
GROUP
BY
i
.
code
)
SELECT
DISTINCT
/*Octopus id, id unique pour un individu immuable dans le temps, remplace le code harpege*/
...
...
@@ -179,8 +190,8 @@ SELECT DISTINCT
THEN
1
ELSE
0
END
numero_insee_provisoire
,
/* Banque */
TRIM
(
vindiban
.
iban
)
iban
,
TRIM
(
vindiban
.
bic
)
bic
,
COALESCE
(
TRIM
(
vindiban
.
iban
)
,
ibandossier
.
iban
)
iban
,
COALESCE
(
TRIM
(
vindiban
.
bic
)
,
ibandossier
.
bic
)
bic
,
CAST
(
NULL
AS
numeric
(
1
))
rib_hors_sepa
,
/* Données complémentaires */
CAST
(
NULL
AS
varchar2
(
255
))
autre_1
,
...
...
@@ -206,6 +217,7 @@ FROM i
LEFT
JOIN
octo
.
individu
@
octoprod
ind
ON
ind
.
c_individu_chaine
=
induni
.
c_individu_chaine
LEFT
JOIN
octo
.
v_individu_insee
@
octoprod
vindinsee
ON
ind
.
c_individu_chaine
=
vindinsee
.
individu_id
LEFT
JOIN
octo
.
v_individu_iban
@
octoprod
vindiban
ON
vindiban
.
individu_id
=
ind
.
c_individu_chaine
LEFT
JOIN
iban_dossier
ibandossier
ON
ibandossier
.
code
=
ind
.
c_individu_chaine
LEFT
JOIN
octo
.
v_individu
@
octoprod
vind
ON
vind
.
c_individu_chaine
=
induni
.
c_individu_chaine
--On récupére la structure principale de l'individu
LEFT
JOIN
structure_aff_enseigne
sae
ON
sae
.
individu_id
=
induni
.
c_individu_chaine
...
...
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