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

Adaptation SRC_GRADE octopus pour éviter les doublons

parent 0cc70c59
CREATE
OR REPLACE FORCE VIEW SRC_GRADE AS
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
JOIN source s ON s.code = 'Octopus'
WHERE SYSDATE BETWEEN COALESCE(g.d_ouverture, SYSDATE) AND COALESCE(g.d_fermeture + 1, SYSDATE)
SELECT
g.lib_court libelle_court,
g.lib_long libelle_long,
s.id source_id,
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) AND histo_destruction IS NULL
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment