Skip to content
Snippets Groups Projects
Commit be78deab authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

On évite de générer des divisions par zéro si un seuil de dédoublement est forcé à 0

parent bbc0c436
No related branches found
No related tags found
No related merge requests found
......@@ -378,15 +378,15 @@ CREATE OR REPLACE PACKAGE BODY "UNICAEN_TBL" AS
heures_ens,
--t_effectif,t_dedoublement,
CASE WHEN t_effectif < ouverture THEN 0 ELSE
CASE WHEN t_effectif < ouverture OR dedoublement = 0 OR t_effectif = 0 THEN 0 ELSE
(CEIL(t_effectif / dedoublement) * effectif) / t_effectif
END groupes,
CASE WHEN t_effectif < ouverture THEN 0 ELSE
CASE WHEN t_effectif < ouverture OR dedoublement = 0 OR t_effectif = 0 THEN 0 ELSE
((CEIL(t_effectif / dedoublement) * effectif) / t_effectif) * heures_ens
END heures,
CASE WHEN t_effectif < ouverture THEN 0 ELSE
CASE WHEN t_effectif < ouverture OR dedoublement = 0 OR t_effectif = 0 THEN 0 ELSE
((CEIL(t_effectif / dedoublement) * effectif) / t_effectif) * hetd
END hetd
......
......@@ -19,15 +19,15 @@ SELECT
heures_ens,
--t_effectif,t_dedoublement,
CASE WHEN t_effectif < ouverture THEN 0 ELSE
CASE WHEN t_effectif < ouverture OR dedoublement = 0 OR t_effectif = 0 THEN 0 ELSE
(CEIL(t_effectif / dedoublement) * effectif) / t_effectif
END groupes,
CASE WHEN t_effectif < ouverture THEN 0 ELSE
CASE WHEN t_effectif < ouverture OR dedoublement = 0 OR t_effectif = 0 THEN 0 ELSE
((CEIL(t_effectif / dedoublement) * effectif) / t_effectif) * heures_ens
END heures,
CASE WHEN t_effectif < ouverture THEN 0 ELSE
CASE WHEN t_effectif < ouverture OR dedoublement = 0 OR t_effectif = 0 THEN 0 ELSE
((CEIL(t_effectif / dedoublement) * effectif) / t_effectif) * hetd
END hetd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment