1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| select tb_unite.nom_unite, tb_effectif.date_mois,
/* affichage du nombre de cadres */
(
case
when (:Structure = 1) then tb_effectif.nbr_cadre_unite
when (:Structure = 2) then tb_effectif.nbr_cadre_step
when (:Structure = 3) then tb_effectif.nbr_cadre_centre
when (:Structure = 4) then tb_effectif.nbr_cadre_sr
else 'ERREUR DE SASIE'
end
) nb_cadre,
/* affichage du nombre de maitrises */
(
case
when (:Structure = 1) then tb_effectif.nbr_maitrise_unite
when (:Structure = 2) then tb_effectif.nbr_maitrise_step
when (:Structure = 3) then tb_effectif.nbr_maitrise_centre
when (:Structure = 4) then tb_effectif.nbr_maitrise_sr
else 'ERREUR DE SASIE'
end
) nb_maitrise,
/* affichage du nombre d'agents d'exécution */
(
case
when (:Structure = 1) then tb_effectif.nbr_execution_unite
when (:Structure = 2) then tb_effectif.nbr_execution_step
when (:Structure = 4) then tb_effectif.nbr_execution_sr
else 'ERREUR DE SASIE'
end
) nb_execution
from tb_effectif
inner join tb_unite on (tb_unite.code_unite = tb_effectif.code_unite)
where (
tb_unite.nom_unite = :n_unite and
extract (year from tb_effectif.date_mois) =:annee and
extract (month from tb_effectif.date_mois) =:mois
) |
Partager