ZDDRD Mots-clef de paie et éventuels traitements associés.
Par AMO
Mots-Clefs et traitements d’alimentation
with traitements as
(select a.gptrai, a.cdtrai, a.zooprd, substr(replace(REGEXP_REPLACE(zooprd,' {0,}UT-NOM-MOTCLE', ''),'"',''),1,6) as "MC" from tr3p a, ap40 b
where a.gptrai = b.gptrai and a.cdtrai = b.cdtrai
and a.zooprd like '%UT-NOM-MOTCLE%'
and b.cdpros = 'FFCAL')
select a.cdcode, b.liblon, c.gptrai, c.cdtrai, c.zooprd
from zd00 a, zd01 b, traitements c
where a.nudoss = b.nudoss
and a.cdstco = 'DRD'
and b.cdlang = 'F'
and trim(a.cdcode) = c.MC(+)
order by a.cdcode ;