-------------charge massique--------------------------------------- select tb_step.nom_step, tb_process.date_bilan, ( (((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000)/ (tb_matiere_seche.mat_seche*(0.7) * (8947*2)))"charge massique" , case when (((((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000)/ (tb_matiere_seche.mat_seche * (0.7) * (8947*2))) < 0.1 ) then 'aération prolongée' when ( ( (((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000)/ (tb_matiere_seche.mat_seche *(0.7) * (8947*2))) between 0.1 and 0.2 ) then 'faible charge ' when ( ( (((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000)/ (tb_matiere_seche.mat_seche *(0.7)* (8947*2))) between 0.2 and 0.5 ) then 'moyenne charge ' else 'Hors gamme' end procede from tb_step inner join tb_process on (tb_process.code_step = tb_step.code_step) inner join tb_matiere_seche on (tb_matiere_seche.code_step= tb_step.code_step) where ( (tb_process.date_bilan between :DATE_DEBUT and :DATE_FIN ) and ( tb_process.date_bilan = tb_matiere_seche.date_bilan) and (tb_matiere_seche.code_point_prlv = 3 ) and ((tb_step.nom_step) like upper(:step || '%')) ) -------------charge volumique-------------------------- select tb_step.nom_step, tb_process.date_bilan, ((((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000) / (8947*2)) "charge volumique" , case when (((((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000) / (8947*2)) < 0.35 ) then 'aération prolongée' when ( ((((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000) / (8947*2)) between 0.35 and 0.5 ) then 'faible charge ' when ( ((((tb_process.volume_mj_entree)* (tb_process.dbo5_entree))/1000) / (8947*2)) between 0.5 and 2 ) then 'moyenne charge ' else 'Hors gamme' end procede from tb_step inner join tb_process on (tb_process.code_step = tb_step.code_step) where ( (tb_process.date_bilan between :DATE_DEBUT and :DATE_FIN ) and ((tb_step.nom_step) like upper(:step || '%')) ) --------------------- calcul de l'âge des boues -------------------------------------- select tb_step.nom_step, tb_process.date_bilan, (((tb_matiere_seche.mat_seche )* (8947*2))*0.7)/ ((tb_destination_boue.poids_mat_seche)/(tb_process.nombre_jour_reel ))"age des boues", case when (((tb_matiere_seche.mat_seche) * (8947*2)/ ((tb_destination_boue.poids_mat_seche)/(tb_process.nombre_jour_reel ))) > 15 ) then 'aération prolongée' when (((tb_matiere_seche.mat_seche * (8947*2))/ ((tb_destination_boue.poids_mat_seche)/(tb_process.nombre_jour_reel ))) between 10 and 15 ) then 'faible charge ' when (((tb_matiere_seche.mat_seche )* (8947*2))/ ((tb_destination_boue.poids_mat_seche)/(tb_process.nombre_jour_reel ))) between 2 and 8 then 'moyenne charge ' else 'Hors gamme' end procede from tb_step inner join tb_process on (tb_process.code_step = tb_step.code_step) and (tb_process.date_bilan between :DATE_DEBUT and :DATE_FIN) left join tb_matiere_seche on (tb_matiere_seche.code_step = tb_step.code_step) left join tb_destination_boue on (tb_destination_boue.code_step = tb_step.code_step) where ( (tb_process.date_bilan = tb_matiere_seche.date_bilan) and (tb_matiere_seche.date_bilan = tb_destination_boue.date_mois) and (tb_matiere_seche.code_point_prlv = 3 ) and ((tb_step.nom_step) like upper(:step || '%')) ) -------------- calcul du temps de sejour ----------------------------- select tb_step.nom_step, tb_process.date_bilan, ((8947/tb_process.volume_mj_entree)*24)"temps de séjour heure" , case when (((8947/tb_process.volume_mj_entree)*24) > 24 ) then 'aération prolongée' when (((8947/tb_process.volume_mj_entree)*24) between 8 and 24 ) then 'faible charge ' when (((8947/tb_process.volume_mj_entree)*24) between 2 and 8 )then 'moyenne charge ' else 'Hors gamme' end procede from tb_step inner join tb_process on (tb_process.code_step = tb_step.code_step) where ( (tb_process.date_bilan between :DATE_DEBUT and :DATE_FIN ) and ((tb_step.nom_step) like upper(:step || '%')) ) -------------calcul du MVS-------------------------------------------- select tb_step.nom_step, tb_matiere_seche.mat_seche, case when (((tb_matiere_seche.mat_seche)* 0.7 ) between 4 and 6 ) then 'aération prolongée' when (((tb_matiere_seche.mat_seche)* 0.7)between 3 and 4 ) then 'faible charge ' when (((tb_matiere_seche.mat_seche)* 0.7 )between 3 and 4) then 'moyenne charge ' else 'Hors gamme' end procede from tb_step inner join tb_matiere_seche on (tb_step.code_step = tb_matiere_seche.code_step) where ( ( tb_matiere_seche.date_bilan between :DATE_DEBUT and :DATE_FIN ) and (tb_matiere_seche.code_point_prlv = 3) and (tb_step.nom_step) like upper(:step || '%') )