Commit 00f0810f authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Adaptation SRC_GRADE octopus pour éviter les doublons

parent 0cc70c59
Loading
Loading
Loading
Loading
+6 −6
Changes for doc/Connecteurs-Import/Octopus/SRC_GRADE.sql: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
CREATE
OR REPLACE FORCE VIEW SRC_GRADE AS
SELECT g.lib_court libelle_court,
 SELECT
    g.lib_court libelle_court,
    g.lib_long  libelle_long,
    s.id        source_id,
       g.c_grade   source_code,
       null        echelle,
       --null        corps_id
FROM grade@octoprod g
    g.c_grade   source_code
FROM octo.grade@octoprod g
JOIN octo.grade_map@octoprod gm ON gm.grade_id = g.id AND gm.c_source = 'SIHAM'
JOIN source s ON s.code = 'Octopus'
WHERE SYSDATE BETWEEN COALESCE(g.d_ouverture, SYSDATE) AND COALESCE(g.d_fermeture + 1, SYSDATE)
WHERE SYSDATE BETWEEN COALESCE(g.d_ouverture, SYSDATE) AND COALESCE(g.d_fermeture + 1, SYSDATE) AND histo_destruction IS NULL