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
Loading
Loading
Loading
Loading
+3 −3
Changes for data/ddl/package/UNICAEN_TBL/body.sql: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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

+3 −3
Changes for data/ddl/view/V_TBL_CHARGENS.sql: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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