1 2 3 4 5 6 7 8
|
SELECT h.agt_matricule,h.agt_nom ||h.agt_prenom as nom ,h_structures.str_design,h_fonctions.fct_designation, CASE
WHEN 30-SUM(t.pris) IS NULL THEN 30
WHEN 30-SUM(t.pris)>0 then 30-SUM(t.pris)
end david
FROM récap t ,h_agent h,h_fonctions ,h_structures
WHERE t.matricule (+) =h.agt_matricule and h.agt_cstruct=h_structures.str_cstruct and h.agt_cfonction=h_fonctions.fct_cfonction and h.agt_oper='1' AND t.exercice (+) = 2013 --OR t.exercice IS NULL)
GROUP BY h.agt_matricule,h.agt_nom ,h.agt_prenom,h_structures.str_design,h_fonctions.fct_designation |
Partager