|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
<VUE name="PMSI000438" label="PMSI. Evolution comparative C.A." title="= 'Comparaison C.A. par ' + SELECT.GROUPBY_LABEL + ' ('+ VIEW.COMPAREPERIODETXT + ' : ' + VIEW.PERIODE_D_LABEL + ' à ' + VIEW.TOPERIODE_D_LABEL + ' vs ' + ' N : '+ SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" softCode="iCTI_pmsi" globals="PMSI_globals.XML" componentsFile="PMSI_components.XML" helpDokuWIkiDir="pmsi:sejours_analyse_globale:rss:sejours_rss:" helpDokuWIkiFile="pmsi000008" helpFile="iCTI_PMSI_PMSI000035.HTML">
|
|
|
<VIEWPROPERTIES componentName="PROPERTIES_RSS" />
|
|
|
<VIEWPROPERTIES componentName="PROPERTIES_SELECT_TABTREE" />
|
|
|
<VIEWPROPERTIES>
|
|
|
<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
|
|
|
<PROPERTY name="DATAHEADERTEXT">
|
|
|
<value><![CDATA[[EVAL
|
|
|
// <?php
|
|
|
|
|
|
function PMSI000438_PMSI_CA_data_HEADERTEXT($DATA) {
|
|
|
switch ($DATA) {
|
|
|
case '1.1':
|
|
|
return "Nombre de séjours";
|
|
|
break;
|
|
|
case '1.2':
|
|
|
return "Nombre de séjours 0 nuit";
|
|
|
break;
|
|
|
case '1.22': // Taux de séjours 0 nuit
|
|
|
return "Taux de séjours 0 nuit";
|
|
|
break;
|
|
|
case '1.3':
|
|
|
return "Nombre de séjours 1 nuit";
|
|
|
break;
|
|
|
case '1.4': // Nombre de séjours > 1 nuit
|
|
|
return "Nombre de séjours > 1 nuit";
|
|
|
break;
|
|
|
case '1.5': // Nombre de séjours 2 nuit
|
|
|
return "Nombre de séjours 2 nuit";
|
|
|
break;
|
|
|
case '1.6': // Nombre de séjours > 2 nuits
|
|
|
return "Nombre de séjours > 2 nuits";
|
|
|
break;
|
|
|
case '1.7': // Nombre de séances
|
|
|
return "Nombre de séances";
|
|
|
break;
|
|
|
case '1.8': // Nombre de patients
|
|
|
return "Nombre de patients";
|
|
|
break;
|
|
|
case '1.9': // Nombre de journées hospitalisé
|
|
|
return "Nombre de journées hospitalisé";
|
|
|
break;
|
|
|
case '1.11': // Nombre de journées d'hospitalisation
|
|
|
return "Nombre de journées hospitalisation";
|
|
|
break;
|
|
|
case '1.12': // Nombre EXH
|
|
|
return "Nombre EXH";
|
|
|
break;
|
|
|
case '1.13': // Nombre EXB
|
|
|
return "Nombre EXB";
|
|
|
break;
|
|
|
case '1.14': // Nombre de séjours hospitalisé
|
|
|
return "Nombre de séjours hospitalisé";
|
|
|
break;
|
|
|
case '1.15': // Age moyen des patients
|
|
|
return "Age moyen des patients";
|
|
|
break;
|
|
|
case '10.13': // Age moy public qualifié
|
|
|
return "Age moy public qualifié";
|
|
|
break;
|
|
|
case '10.14': // Age moy privé qualifié
|
|
|
return "Age moy privé qualifié";
|
|
|
break;
|
|
|
case '1.16': // Séjours dont séances
|
|
|
return "Séjours dont séances";
|
|
|
break;
|
|
|
case '3.1': // DMS
|
|
|
return "DMS";
|
|
|
break;
|
|
|
case '2.1': // CA T2A
|
|
|
return "CA T2A";
|
|
|
break;
|
|
|
case '5.1': // CA T2A 0 nuit
|
|
|
return "CA T2A 0 nuit";
|
|
|
break;
|
|
|
case '6.1': // CA T2A 1 nuit
|
|
|
return "CA T2A 1 nuit";
|
|
|
break;
|
|
|
case '7.1': // CA T2A hospitalisé
|
|
|
return "CA T2A hospitalisé";
|
|
|
break;
|
|
|
case '2.2': // CA etablissement, clinique
|
|
|
return "CA etablissement, clinique";
|
|
|
break;
|
|
|
case '5.2': // CA etablissement 0 nuit
|
|
|
return "CA etablissement 0 nuit";
|
|
|
break;
|
|
|
case '6.2': // CA etablissement 1 nuit
|
|
|
return "CA etablissement 1 nuit";
|
|
|
break;
|
|
|
case '7.2': // CA etablissement hospitalisé
|
|
|
return "CA etablissement hospitalisé";
|
|
|
break;
|
|
|
case '2.3': // CA moyen etablissement, clinique
|
|
|
return "CA moyen etablissement";
|
|
|
break;
|
|
|
case '10.2': // CA Clinique journalier
|
|
|
return "CA Clinique journalier";
|
|
|
break;
|
|
|
case '5.3': // CA moyen etablissement, clinique 0 nuit
|
|
|
return "CA moyen etablissement, clinique 0 nuit";
|
|
|
break;
|
|
|
case '6.3': // CA moyen etablissement, clinique 1 nuit
|
|
|
return "CA moyen etablissement, clinique 1 nuit";
|
|
|
break;
|
|
|
case '7.3': // CA moyen etablissement, clinique hospitalisé
|
|
|
return "CA moyen etablissement, clinique hospitalisé";
|
|
|
break;
|
|
|
case '2.4': // CA moyen T2A
|
|
|
return "CA moyen T2A";
|
|
|
break;
|
|
|
case '5.4': // CA moyen T2A 0 nuit
|
|
|
return "CA moyen T2A 0 nuit";
|
|
|
break;
|
|
|
case '6.4': // CA moyen T2A 1 nuit
|
|
|
return "CA moyen T2A 1 nuit";
|
|
|
break;
|
|
|
case '7.4': // CA moyen T2A hospitalisé
|
|
|
return "CA moyen T2A hospitalisé";
|
|
|
break;
|
|
|
case '2.5': // CA T2A journalier
|
|
|
return "CA T2A journalier";
|
|
|
break;
|
|
|
case '5.5': // CA T2A journalier 0 nuit
|
|
|
return "CA T2A journalier 0 nuit";
|
|
|
break;
|
|
|
case '6.5': // CA T2A journalier 1 nuit
|
|
|
return "CA T2A journalier 1 nuit";
|
|
|
break;
|
|
|
case '7.5': // CA T2A journalier hospitalisé
|
|
|
return "CA T2A journalier hospitalisé";
|
|
|
break;
|
|
|
case '2.6': // CA GHS facturé
|
|
|
return "CA GHS facturé";
|
|
|
break;
|
|
|
case '5.6': // CA GHS facturé 0 nuit
|
|
|
return "CA GHS facturé 0 nuit";
|
|
|
break;
|
|
|
case '6.6': // CA GHS facturé 1 nuit
|
|
|
return "CA GHS facturé 1 nuit";
|
|
|
break;
|
|
|
case '7.6': // CA GHS facturé hospitalisé
|
|
|
return "CA GHS facturé hospitalisé";
|
|
|
break;
|
|
|
case '2.7': // CA GHS Théorique
|
|
|
return "CA GHS Théorique";
|
|
|
break;
|
|
|
case '5.7': // CA GHS Théorique 0 nuit
|
|
|
return "CA GHS Théorique 0 nuit";
|
|
|
break;
|
|
|
case '6.7': // CA GHS Théorique 1 nuit
|
|
|
return "CA GHS Théorique 1 nuit";
|
|
|
break;
|
|
|
case '7.7': // CA GHS Théorique hospitalisé
|
|
|
return "CA GHS Théorique hospitalisé";
|
|
|
break;
|
|
|
case '2.8': // CA moyen GHS
|
|
|
return "CA moyen GHS";
|
|
|
break;
|
|
|
case '5.8': // CA moyen GHS 0 nuit
|
|
|
return "CA moyen GHS 0 nuit";
|
|
|
break;
|
|
|
case '6.8': // CA moyen GHS 1 nuit
|
|
|
return "CA moyen GHS 1 nuit";
|
|
|
break;
|
|
|
case '7.8': // CA moyen GHS hospitalisé
|
|
|
return "CA moyen GHS hospitalisé";
|
|
|
break;
|
|
|
case '2.9': // CA DMI
|
|
|
return "CA DMI";
|
|
|
break;
|
|
|
case '5.9': // CA DMI 0 nuit
|
|
|
return "CA DMI 0 nuit";
|
|
|
break;
|
|
|
case '6.9': // CA DMI 1 nuit
|
|
|
return "CA DMI 1 nuit";
|
|
|
break;
|
|
|
case '7.9': // CA DMI hospitalisé
|
|
|
return "CA DMI hospitalisé";
|
|
|
break;
|
|
|
case '2.17': // CA moyen DMI
|
|
|
return "CA moyen DMI";
|
|
|
break;
|
|
|
case '5.17': // CA moyen DMI 0 nuit
|
|
|
return "CA moyen DMI 0 nuit";
|
|
|
break;
|
|
|
case '6.17': // CA moyen DMI 1 nuit
|
|
|
return "CA moyen DMI 1 nuit";
|
|
|
break;
|
|
|
case '7.17': // CA moyen DMI hospitalisé
|
|
|
return "CA moyen DMI hospitalisé";
|
|
|
break;
|
|
|
case '2.11': // CA PHC
|
|
|
return "CA PHC";
|
|
|
break;
|
|
|
case '5.11': // CA PHC 0 nuit
|
|
|
return "CA PHC 0 nuit";
|
|
|
break;
|
|
|
case '6.11': // CA PHC 1 nuit
|
|
|
return "CA PHC 1 nuit";
|
|
|
break;
|
|
|
case '7.11': // CA PHC hospitalisé
|
|
|
return "CA PHC hospitalisé";
|
|
|
break;
|
|
|
case '2.12': // CA moyen PHC
|
|
|
return "CA moyen PHC";
|
|
|
break;
|
|
|
case '5.12': // CA moyen PHC 0 nuit
|
|
|
return "CA moyen PHC 0 nuit";
|
|
|
break;
|
|
|
case '6.12': // CA moyen PHC 1 nuit
|
|
|
return "CA moyen PHC 1 nuit";
|
|
|
break;
|
|
|
case '7.12': // CA moyen PHC hospitalisé
|
|
|
return "CA moyen PHC hospitalisé";
|
|
|
break;
|
|
|
case '2.13': // CA EXH
|
|
|
return "CA EXH";
|
|
|
break;
|
|
|
case '7.13': // CA EXH hospitalisé
|
|
|
return "CA EXH hospitalisé";
|
|
|
break;
|
|
|
case '2.14': // CA EXB
|
|
|
return "CA EXB";
|
|
|
break;
|
|
|
case '7.14': // CA EXB hospitalisé
|
|
|
return "CA EXB hospitalisé";
|
|
|
break;
|
|
|
case '2.15': // CA manque à gagner EXB
|
|
|
return "CA manque à gagner EXB";
|
|
|
break;
|
|
|
case '7.15': // CA manque à gagner EXB hospitalisé
|
|
|
return "CA manque à gagner EXB hospitalisé";
|
|
|
break;
|
|
|
case '2.16': // CA honoraires
|
|
|
return " CA honoraires";
|
|
|
break;
|
|
|
case '5.16': // CA honoraires 0 nuit
|
|
|
return "CA honoraires 0 nuit";
|
|
|
break;
|
|
|
case '6.16': // CA honoraires 1 nuit
|
|
|
return "CA honoraires 1 nuit";
|
|
|
break;
|
|
|
case '7.16': // CA honoraires hospitalisé
|
|
|
return "CA honoraires hospitalisé";
|
|
|
break;
|
|
|
case '9.0': // CA total
|
|
|
return "CA total";
|
|
|
break;
|
|
|
case '10.0': // CA total 0 nuit
|
|
|
return "CA total 0 nuit";
|
|
|
break;
|
|
|
case '10.01': // CA total 1 nuit
|
|
|
return "CA total 1 nuit";
|
|
|
break;
|
|
|
case '10.1': // CA total hospitalisés
|
|
|
return "CA total hospitalisés";
|
|
|
break;
|
|
|
case '9.9': // CA total moyen
|
|
|
return "CA total moyen";
|
|
|
break;
|
|
|
case '9.1': // CA Forfaits
|
|
|
return "CA Forfaits";
|
|
|
break;
|
|
|
case '9.3': // Nombre de séjours 0 nuit avec seances
|
|
|
return "Nombre de séjours 0 nuit avec seances";
|
|
|
break;
|
|
|
case '9.4': // CA Autre
|
|
|
return "CA Autre";
|
|
|
break;
|
|
|
case '9.6': // CA Autre T2A
|
|
|
return "CA Autre T2A";
|
|
|
break;
|
|
|
case '9.5': // Nombre de GHM
|
|
|
return "Nombre de GHM";
|
|
|
break;
|
|
|
case '9.7': // Rehosp même GHM
|
|
|
return "Rehosp même GHM";
|
|
|
break;
|
|
|
case '9.8': // Minoration forfaitaire
|
|
|
return "Minoration forfaitaire";
|
|
|
break;
|
|
|
case '10': // Nombre CHIR AMBU
|
|
|
return "Nombre CHIR AMBU";
|
|
|
break;
|
|
|
case '10.12': // Nombre décès
|
|
|
return "Nombre décès";
|
|
|
break;
|
|
|
case '10.11': // DMS GHS nationale
|
|
|
return "DMS GHS nationale";
|
|
|
break;
|
|
|
case '3.2': // Ecart DMS
|
|
|
return "Ecart DMS";
|
|
|
break;
|
|
|
case '3.3': // Performance ATIH
|
|
|
return "Performance ATIH";
|
|
|
break;
|
|
|
case '3.4': // Performance ANAP
|
|
|
return "Performance ANAP";
|
|
|
break;
|
|
|
case '3.5': // Jours bénéficiaires
|
|
|
return "Jours bénéficiaires ";
|
|
|
break;
|
|
|
case '3.6': // Jours indus
|
|
|
return "Jours indus ";
|
|
|
break;
|
|
|
case '3.7': // Ratio Indus / Bénéficiaires
|
|
|
return "Ratio Indus / Bénéficiaires";
|
|
|
break;
|
|
|
case '3.8': // Séjours < DMS Ref
|
|
|
return "Séjours < DMS Ref";
|
|
|
break;
|
|
|
case '3.9': // Séjours = DMS Ref
|
|
|
return "Séjours = DMS Ref";
|
|
|
break;
|
|
|
case '3.11': // Séjours = DMS Ref + 1
|
|
|
return "Séjours = DMS Ref + 1";
|
|
|
break;
|
|
|
case '3.12': // Séjours = DMS Ref + 2
|
|
|
return "Séjours = DMS Ref + 2";
|
|
|
break;
|
|
|
case '3.13': // Séjours = DMS Ref + 3
|
|
|
return "Séjours = DMS Ref + 3";
|
|
|
break;
|
|
|
case '3.13': // Séjours > DMS Ref + 3
|
|
|
return "Séjours > DMS Ref + 3";
|
|
|
break;
|
|
|
case '10.30': // Séjours dans département
|
|
|
return "Séjours dans département";
|
|
|
break;
|
|
|
case '10.31': // Séjours hors département
|
|
|
return "Séjours hors département";
|
|
|
break;
|
|
|
case '10.32': // Séjours dans région
|
|
|
return "Séjours dans région";
|
|
|
break;
|
|
|
case '10.33': // Séjours hors région
|
|
|
return "Séjours hors région";
|
|
|
break;
|
|
|
case '10.34': // Séjours patient hommes
|
|
|
return "Séjours patient hommes";
|
|
|
break;
|
|
|
case '10.35': // Séjours patient femmes
|
|
|
return "Séjours patient femmes";
|
|
|
break;
|
|
|
case '10.36': // Age médian séjour
|
|
|
return "Age médian séjour";
|
|
|
break;
|
|
|
case '11.1': // Nombre de rsa transmis
|
|
|
return "Nombre de rsa transmis";
|
|
|
break;
|
|
|
case '11.2': // RSA en CMD 90 : nombre de RSA groupés dans la CM 90 (groupage en erreur)
|
|
|
return "RSA en CMD 90";
|
|
|
break;
|
|
|
case '11.3': // : Nombre de RSA correspondant aux séjours 9999
|
|
|
return "Nombre de RSA correspondant aux séjours 9999";
|
|
|
break;
|
|
|
case '11.4': // dont RSA en J ou T0
|
|
|
return "Dont RSA en J ou T0";
|
|
|
break;
|
|
|
case '11.5': // Nb de RSA en UHCD réaffecté
|
|
|
return "Nb de RSA en UHCD réaffecté";
|
|
|
break;
|
|
|
case '11.6': // Nombre de séjours/seances total
|
|
|
return "Nombre de séjours/seances total";
|
|
|
break;
|
|
|
case '11.7': // Type de séjour = Mode Entrée=7 et Mode sortie=7
|
|
|
return "Type de séjour = Mode Entrée=7 et Mode sortie=7";
|
|
|
break;
|
|
|
case '11.8': // Type de séjour = Mode Entrée=6 et Mode sortie=6
|
|
|
return "Type de séjour = Mode Entrée=6 et Mode sortie=6";
|
|
|
break;
|
|
|
case '11.9': // Type de séjour = multirum
|
|
|
return "Type de séjour = multirum";
|
|
|
break;
|
|
|
case '12.1': // Nombre de séjours/seances de type de séjour = GHM niveau J ou T ou duree séjour < 2 (type_sejour_ovalide = '1')
|
|
|
return "Nombre de séjours/seances de type de séjour = GHM niveau J ou T ou duree séjour < 2";
|
|
|
break;
|
|
|
case '12.2': // Nombre de séjours/seances de type de séjour = CM 28 (type_sejour_ovalide = '2')
|
|
|
return "Nombre de séjours/seances de type de séjour = CM 28";
|
|
|
break;
|
|
|
case '12.3': // Nombre de séjours/seances type de séjour (type_sejour_ovalide = '3') = autres GHM (hors niveau J ou T ou durée de séjour < 2 et CM 28).
|
|
|
return "Nombre de séjours/seances autres GHM";
|
|
|
break;
|
|
|
case '13.1': // Nombre de séjours en chirurgie
|
|
|
return "Nombre de séjours en chirurgie";
|
|
|
break;
|
|
|
case '13.2': // Nombre de séjours en chirurgie avec acte opératoire le jour d'entrée
|
|
|
return "Nombre de séjours en chirurgie avec acte opératoire le jour d'entrée";
|
|
|
break;
|
|
|
case '13.3': // Nombre de séjours avec sortie transfert ou mutation
|
|
|
return "Nombre de séjours avec sortie transfert ou mutation";
|
|
|
break;
|
|
|
case '13.4': // Nombre de séjours avec sortie domicile
|
|
|
return "Nombre de séjours avec sortie domicile";
|
|
|
break;
|
|
|
case '13.5': // Nombre de journées d'hospitalisation
|
|
|
return "Nombre de journées d'hospitalisation";
|
|
|
break;
|
|
|
case '13.6': // Nombre de séjours autres GHM
|
|
|
return "Nombre de séjours autres GHM";
|
|
|
break;
|
|
|
case '13.7': // Nombre de RSA de la CM 28
|
|
|
return "Nombre de RSA de la CM 28";
|
|
|
break;
|
|
|
case '13.8': // Nombre moyen de séances par RSA établissement
|
|
|
return "Nombre moyen de séances par RSA établissement";
|
|
|
break;
|
|
|
case '13.9' : // Nombre de RSA hors séances
|
|
|
return "Nombre de RSA hors séances";
|
|
|
break;
|
|
|
case '14.0' : // Nb décés / rsa
|
|
|
return "Nombre décés";
|
|
|
break;
|
|
|
case '14.1' : // Ratio décès /rsa base nationale
|
|
|
return "Ratio décès /rsa base nationale";
|
|
|
break;
|
|
|
case '14.2' : // Nombre séjours / séances niveau J ou T
|
|
|
return "Nombre séjours / séances niveau J ou T";
|
|
|
break;
|
|
|
case '14.3' : // Nombre séjours / séances niveau 1 ou A
|
|
|
return "Nombre séjours / séances niveau 1 ou A";
|
|
|
break;
|
|
|
case '14.4' : // Nombre séjours / séances niveau 2 ou B
|
|
|
return "Nombre séjours / séances niveau 2 ou B";
|
|
|
break;
|
|
|
case '14.5' : // Nombre séjours / séances niveau 3 ou C
|
|
|
return "Nombre séjours / séances niveau 3 ou C";
|
|
|
break;
|
|
|
case '14.6' : // Nombre séjours / séances niveau 4 ou D
|
|
|
return "Nombre séjours / séances niveau 4 ou D";
|
|
|
break;
|
|
|
case '14.7' : // Nombre séjours / séances niveau E
|
|
|
return "Nombre séjours / séances niveau E";
|
|
|
break;
|
|
|
case '14.8' : // Nombre séjours / séances niveau Z
|
|
|
return "Nombre séjours / séances niveau Z";
|
|
|
break;
|
|
|
case '14.9' : // séjours / séances niveau J ou T base nationale
|
|
|
return "séjours / séances niveau J ou T base nationale";
|
|
|
break;
|
|
|
case '15.1': // Nombre de journées hors CMD28 et niveau J ou T0
|
|
|
return "Nombre de journées hors CMD28 et niveau J ou T0";
|
|
|
break;
|
|
|
case '15.2': // Nombre de journées hors CMD28 et niveau J ou T0 standardisé
|
|
|
return "Nombre de journées hors CMD28 et niveau J ou T0 standardisé";
|
|
|
break;
|
|
|
case '15.3': // Performance globale
|
|
|
return "Performance globale";
|
|
|
break;
|
|
|
case '15.4': // Nombre de séjours standardisé
|
|
|
return "Nombre de séjours standardisé";
|
|
|
break;
|
|
|
case '15.5': // Diffénce DMS BNat - DMS ETAB
|
|
|
return "Diffénce DMS BNat - DMS ETAB";
|
|
|
break;
|
|
|
case '15.6': // Nombre de diagnostics
|
|
|
return "Nombre de diagnostics";
|
|
|
break;
|
|
|
case '16.1': // Nombre de séjours
|
|
|
return "Nombre de séjours";
|
|
|
break;
|
|
|
case '16.2': // Nombre de Patients
|
|
|
return "Nombre de Patients";
|
|
|
break;
|
|
|
case '16.3': // Nombre prestations Quantité de prestations : Nombre x Coefficient
|
|
|
return "Nombre prestations Quantité de prestations : Nombre x Coefficient";
|
|
|
break;
|
|
|
case '16.4': // Montant facturé (BR)
|
|
|
return "Montant facturé (BR)";
|
|
|
break;
|
|
|
case '16.5': // Montant facturé (BR) Hors coefficient
|
|
|
return "Montant facturé (BR) Hors coefficient";
|
|
|
break;
|
|
|
case '16.6': // Montant remboursé
|
|
|
return "Montant remboursé";
|
|
|
break;
|
|
|
case '16.7': // Nombre de séjours non valorisé
|
|
|
return "Nombre de séjours non valorisé";
|
|
|
break;
|
|
|
case '16.8': // Montant non valorisés
|
|
|
return "Montant non valorisés";
|
|
|
break;
|
|
|
case '16.9': // Nombre de séjours non traités prestation inter-établissement
|
|
|
return "Nombre de séjours non traités prestation inter-établissement";
|
|
|
break;
|
|
|
case '17.1': // Montant non traités prestation inter-établissement
|
|
|
return "Montant non traités prestation inter-établissement";
|
|
|
break;
|
|
|
case '17.2': // Nombre de séjours non valorisés pb chainage
|
|
|
return "Nombre de séjours non valorisés pb chainage";
|
|
|
break;
|
|
|
case '17.3': // Montant non valorisés pb chainage
|
|
|
return "Montant non valorisés pb chainage";
|
|
|
break;
|
|
|
case '17.4': // Nombre de séjours non valorisés pb variable bloquante
|
|
|
return "Nombre de séjours non valorisés pb variable bloquante";
|
|
|
break;
|
|
|
case '17.5': // Montant non valorisés pb variable bloquante
|
|
|
return "Montant non valorisés pb variable bloquante";
|
|
|
break;
|
|
|
case '17.6': // Nombre de séjours non valorisés non facturable AM
|
|
|
return "Nombre de séjours non valorisés non facturable AM";
|
|
|
break;
|
|
|
case '17.7': // Montant non valorisés non facturable AM
|
|
|
return "Montant non valorisés non facturable AM";
|
|
|
break;
|
|
|
case '17.8': // Montant lié à la suppression des SI/SC en cas de limitation
|
|
|
return "Montant lié à la suppression des SI/SC en cas de limitation";
|
|
|
break;
|
|
|
case '17.9': // Nombre de séjours valorisés
|
|
|
return "Nombre de séjours valorisés";
|
|
|
break;
|
|
|
case '18.1': // Nombre de séjours valorisés en hospitalisation complète
|
|
|
return "Nombre de séjours valorisés en hospitalisation complète";
|
|
|
break;
|
|
|
case '18.2': // Nombre de séjours sans nuitée
|
|
|
return "Nombre de séjours sans nuitée";
|
|
|
break;
|
|
|
case '18.3': // Nombre de séances valorisés
|
|
|
return "Nombre de séances valorisés";
|
|
|
break;
|
|
|
case '18.4': // Nombre de séjours transmis
|
|
|
return "Nombre de séjours transmis";
|
|
|
break;
|
|
|
case '18.5': // Montant des séjours supprimés
|
|
|
return "Montant des séjours supprimés";
|
|
|
break;
|
|
|
case '19.0': // Nombre de séjours transmis
|
|
|
return "Nombre de séjours transmis";
|
|
|
break;
|
|
|
case '19.1': // Nombre de séjours Non traités
|
|
|
return "Nombre de séjours Non traités";
|
|
|
break;
|
|
|
case '19.2': // Montant non traités
|
|
|
return "Montant non traités";
|
|
|
break;
|
|
|
case '19.3': // Montant valorisés
|
|
|
return "Montant valorisés";
|
|
|
break;
|
|
|
case '19.4': // Montant valorisés hospitalisation compléte
|
|
|
return "Montant valorisés hospitalisation compléte";
|
|
|
break;
|
|
|
case '19.5': // Montant valorisés sans nuitée
|
|
|
return "Montant valorisés sans nuitée";
|
|
|
break;
|
|
|
case '19.6': // Montant valorisés des séances
|
|
|
return "Montant valorisés des séances";
|
|
|
break;
|
|
|
case '19.7': // Nombre prestations supprimé Quantité de prestations : Nombre x Coefficient
|
|
|
return "Nombre prestations supprimé Quantité de prestations : Nombre x Coefficient";
|
|
|
break;
|
|
|
case '19.8': // Séjours taux de remb différent de 100 et montant TM égal à 0
|
|
|
return "Séjours taux de remb différent de 100 et montant TM égal à 0";
|
|
|
break;
|
|
|
case '19.9': // Séjours taux de remb égal à 100 et montant TM différent de 0
|
|
|
return "Séjours taux de remb égal à 100 et montant TM différent de 0";
|
|
|
break;
|
|
|
case '20.1': // Séjours FJ à la charge de l'assuré et montant FJ égal à 0
|
|
|
return "Séjours FJ à la charge de l'assuré et montant FJ égal à 0";
|
|
|
break;
|
|
|
case '20.2': // Séjours FJ n'est pas applicable et montant FJ différent de 0
|
|
|
return "Séjours FJ n'est pas applicable et montant FJ différent de 0";
|
|
|
break;
|
|
|
case '20.3' : // Séjours où FJ et DS non compatibles (à voir)
|
|
|
return "Séjours où FJ et DS non compatibles";
|
|
|
break;
|
|
|
case '20.4': // Séjours où mnt BR différent de mnt AM + mnt TM
|
|
|
return "Séjours où mnt BR différent de mnt AM + mnt TM";
|
|
|
break;
|
|
|
case '20.5' : // Séjours de + 30 jours avec exo Tm=2, transfert depuis MCO et Tx remb différent de 100% (**)
|
|
|
return "Séjours de + 30 jours avec exo Tm=2, transfert depuis MCO et Tx remb différent de 100%";
|
|
|
break;
|
|
|
case '20.6': // Autres séjours avec exo Tm=2 et Tx remb=100% (***)
|
|
|
return "Autres séjours avec exo Tm=2 et Tx remb=100%";
|
|
|
break;
|
|
|
case '20.7': // Séjours sans anomalies
|
|
|
return "Séjours sans anomalies";
|
|
|
break;
|
|
|
case '21.1': // Nombre de séjours EXB
|
|
|
return "Nombre de séjours EXB";
|
|
|
break;
|
|
|
case '21.2': // Nombre de séjours avec réhosp dans le même GHM
|
|
|
return "Nombre de séjours avec réhosp dans le même GHM";
|
|
|
break;
|
|
|
case '21.3': // Montant BR des séjours EXB avec coefficient prudentiel
|
|
|
return "Montant BR des séjours EXB avec coefficient prudentiel";
|
|
|
break;
|
|
|
case '21.4': // Montant BR total des séjours EXB
|
|
|
return "Montant BR total des séjours EXB";
|
|
|
break;
|
|
|
case '21.5': // Montant BR des séjours avec réhosp dans le même GHM avec coefficient prudentiel
|
|
|
return "Montant BR des séjours avec réhosp dans le même GHM avec coefficient prudentiel";
|
|
|
break;
|
|
|
case '21.6': // Montant de séjours avec réhosp dans le même GHM
|
|
|
return "Montant de séjours avec réhosp dans le même GHM";
|
|
|
break;
|
|
|
case '21.7': // Montant facturé (BR) avec coefficient prudentiel sans déduction montant EXB
|
|
|
return "Montant facturé (BR) avec coefficient prudentiel sans déduction montant EXB";
|
|
|
break;
|
|
|
case '21.8': // Montant BR sans déduction du montant EXB
|
|
|
return "Montant BR sans déduction du montant EXB";
|
|
|
break;
|
|
|
case '21.9': // Montant GHS sans déduction du montant EXB
|
|
|
return "Montant GHS sans déduction du montant EXB";
|
|
|
break;
|
|
|
case '22.1': //Dt Nb réalisés aux urgences
|
|
|
return "Dt Nb réalisés aux urgences";
|
|
|
break;
|
|
|
case '22.2': //Dt Mnt BR réalisé aux urgences
|
|
|
return "Dt Mnt BR réalisé aux urgences";
|
|
|
break;
|
|
|
case '22.3': //Dt Mnt AM réalisé aux urgences
|
|
|
return "Dt Mnt AM réalisé aux urgences";
|
|
|
break;
|
|
|
case '22.4': //MT activité programmée hors urgence
|
|
|
return "MT activité programmée hors urgence";
|
|
|
break;
|
|
|
case '22.5': //MT BR valorisé par FIDES
|
|
|
return "MT BR valorisé par FIDES";
|
|
|
break;
|
|
|
case '22.6': //MT BR non valorisé par FIDES
|
|
|
return "MT BR non valorisé par FIDES";
|
|
|
break;
|
|
|
case '22.7': //MT remboursé AM valorisé par FIDES
|
|
|
return "MT remboursé AM valorisé par FIDES";
|
|
|
break;
|
|
|
case '22.8': //MT Remboursé AM non valorisé par FIDES
|
|
|
return "MT Remboursé AM non valorisé par FIDES";
|
|
|
break;
|
|
|
case '22.9': //Dt Nb de prestations valorisé par FIDES
|
|
|
return "Dt Nb de prestations valorisé par FIDES";
|
|
|
break;
|
|
|
case '23.1': //Dt Nb de prestations non valorisé par FIDES
|
|
|
return "Dt Nb de prestations non valorisé par FIDES";
|
|
|
break;
|
|
|
case '23.2': //Nb séjours non controlés
|
|
|
return "Nb séjours non controlés";
|
|
|
break;
|
|
|
case '23.3': // CA GHS BRUT
|
|
|
return "CA GHS BRUT";
|
|
|
break;
|
|
|
default:
|
|
|
return "Nombre de séjours";
|
|
|
|
|
|
default:
|
|
|
return '0';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// ?>
|
|
|
EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="HEADERTEXT">
|
|
|
<value><![CDATA[[EVAL
|
|
|
// <?php
|
|
|
return
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA1]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA2]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA3]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA4]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA5]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA6]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA7]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA8]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA9]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA10]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA011]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA012]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA013]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA014]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('[DATA015]') .'|'.
|
|
|
PMSI000438_PMSI_CA_data_HEADERTEXT('1');
|
|
|
|
|
|
// ?>
|
|
|
EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA1F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA1]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA1D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA1]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA2F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA2]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA2D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA2]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA3F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA3]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA3D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA3]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA4F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA4]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA4D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA4]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA5F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA5]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA5D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA5]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA6F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA6]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA6D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA6]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA7F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA7]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA7D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA7]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA8F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA8]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA8D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA8]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA9F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA9]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA9D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA9]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA10F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA10]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA10D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA10]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA11F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA011]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA11D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA011]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA12F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA012]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA12D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA012]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA13F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA013]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA13D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA013]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA14F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA014]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA14D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA014]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA15F">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA015]', 0, "date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="DATA15D">
|
|
|
<value><![CDATA[[EVAL return PMSI_CA_data('[DATA015]', 0, "date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", "","0"); EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="COMPAREPERIODETXT">
|
|
|
<value><![CDATA[[EVAL
|
|
|
|
|
|
$TYPE_COMPARAISON_TXT = '[TYPE_COMPARAISON]';
|
|
|
if($TYPE_COMPARAISON_TXT == '2'){
|
|
|
return 'N-1';
|
|
|
} else {
|
|
|
return 'N-2';
|
|
|
}
|
|
|
|
|
|
|
|
|
EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="NB_MOIS">
|
|
|
<value>
|
|
|
<![CDATA[
|
|
|
[EVAL
|
|
|
$filds1='[PERIODE]';
|
|
|
$filds2='[TOPERIODE]';
|
|
|
$DIFF= (int)(substr($filds2, 5, 2)) - (int)(substr($filds1, 5, 2));
|
|
|
for($i=(int)(substr($filds1, 5, 2));$i<=(int)(substr($filds2, 5, 2));$i++){
|
|
|
$tab.='|'.$i;
|
|
|
}
|
|
|
return $tab;
|
|
|
EVAL]
|
|
|
]]>
|
|
|
</value>
|
|
|
</PROPERTY>
|
|
|
<PROPERTY name="NB_DATA">
|
|
|
<value>
|
|
|
<![CDATA[
|
|
|
[EVAL
|
|
|
$maxdata = 5;
|
|
|
if('[DATA2]' != '0' ) {$maxdata = 10;}
|
|
|
if('[DATA3]' != '0' ) {$maxdata = 15;}
|
|
|
if('[DATA4]' != '0' ) {$maxdata = 20;}
|
|
|
if('[DATA5]' != '0' ) {$maxdata = 25;}
|
|
|
if('[DATA6]' != '0' ) {$maxdata = 30;}
|
|
|
if('[DATA7]' != '0' ) {$maxdata = 35;}
|
|
|
if('[DATA8]' != '0' ) {$maxdata = 40;}
|
|
|
if('[DATA9]' != '0' ) {$maxdata = 45;}
|
|
|
if('[DATA10]' != '0' ) {$maxdata = 50;}
|
|
|
if('[DATA011]' != '0' ) {$maxdata = 55;}
|
|
|
if('[DATA012]' != '0' ) {$maxdata = 60;}
|
|
|
if('[DATA013]' != '0' ) {$maxdata = 65;}
|
|
|
if('[DATA014]' != '0' ) {$maxdata = 70;}
|
|
|
if('[DATA015]' != '0' ) {$maxdata = 75;}
|
|
|
return $maxdata;
|
|
|
EVAL]
|
|
|
]]>
|
|
|
</value>
|
|
|
</PROPERTY>
|
|
|
</VIEWPROPERTIES>
|
|
|
<SELECTIONS label="">
|
|
|
<GROUP label="Période">
|
|
|
<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
|
|
|
<FIELD name="PERIODE" label="Période" UI="combo" tree="true" width="150" default="2014-07-01" printable="false" globalListProvider="DATE_DEBUT" />
|
|
|
<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="150" default="2014-12-31" printable="false" globalListProvider="DATE_FIN" />
|
|
|
</GROUP>
|
|
|
<GROUP label="Période précédente">
|
|
|
<FIELD name="TYPE_COMPARAISON" label="" UI="combo" default="2" width="130">
|
|
|
<OPTION label="Période N-1" data="2" />
|
|
|
<OPTION label="Période N-2" data="1" />
|
|
|
<OPTION label="Saisie période" data="S" />
|
|
|
</FIELD>
|
|
|
<FIELD name="PERIODE_D" label="Période précédente" UI="combo" tree="true" width="150" default="2014-01-01" printable="false" globalListProvider="DATE_DEBUT" visible="= SELECT.TYPE_COMPARAISON == 'S'" />
|
|
|
<FIELD name="TOPERIODE_D" label="à" UI="combo" tree="true" width="150" default="2014-06-30" printable="false" globalListProvider="DATE_FIN" visible="= SELECT.TYPE_COMPARAISON == 'S'" />
|
|
|
</GROUP>
|
|
|
<GROUP label="Données">
|
|
|
<FIELD name="DATA1" tree="true" label="" UI="combo" default="1.1" width="300" showIfNotDefault="true" printable="false">
|
|
|
<OPTION label="DATA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA2" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA1 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA3" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA1 != '0') && ( SELECT.DATA2 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="DATA4" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA5" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA6" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="DATA7" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA8" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA9" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="DATA10" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0') && ( SELECT.DATA9 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA011" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0') && ( SELECT.DATA9 != '0') && ( SELECT.DATA10 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA012" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0') && ( SELECT.DATA9 != '0') && ( SELECT.DATA10 != '0') && ( SELECT.DATA11 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="DATA013" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0') && ( SELECT.DATA9 != '0') && ( SELECT.DATA10 != '0') && ( SELECT.DATA011 != '0') && ( SELECT.DATA012 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA014" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0') && ( SELECT.DATA9 != '0') && ( SELECT.DATA10 != '0') && ( SELECT.DATA011 != '0') && ( SELECT.DATA012 != '0') && ( SELECT.DATA013 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="DATA015" tree="true" label="" UI="combo" default="0" default2="0" width="300" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA3 != '0') && ( SELECT.DATA2 != '0') && ( SELECT.DATA1 != '0') && ( SELECT.DATA4 != '0') && ( SELECT.DATA5 != '0') && ( SELECT.DATA6 != '0') && ( SELECT.DATA7 != '0') && ( SELECT.DATA8 != '0') && ( SELECT.DATA9 != '0') && ( SELECT.DATA10 != '0') && ( SELECT.DATA011 != '0') && ( SELECT.DATA012 != '0') && ( SELECT.DATA013 != '0') && ( SELECT.DATA014 != '0')">
|
|
|
<OPTION label="" data="0"/>
|
|
|
<OPTION label="DATA_CA" data="" globalListProvider="DATA_CA"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="GROUPBY" width="220" label="Arborescence" UI="combo" default="-1" tree="true">
|
|
|
<OPTION label="Pas de second niveau" data="-1" />
|
|
|
<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS" />
|
|
|
</FIELD>
|
|
|
<FIELD name="GROUPBY_TAB" label="Présentation" UI="combo" default="TAB" value="TAB" visible="false">
|
|
|
<OPTION label="Automatique" data="AUTO"/>
|
|
|
<OPTION label="Arbre" data="TREE"/>
|
|
|
<OPTION label="Onglet" data="TAB"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="GROUPBY_2" width="220" label="" UI="combo" default="MSOR" tree="true">
|
|
|
<OPTION label="Mois sortie" data="MSOR" />
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="SHOWDMSREF" label="" width="1" UI="text" default="1" printable="false" visible="false" />
|
|
|
</GROUP>
|
|
|
<GROUP>
|
|
|
<FIELD name="LGROUPBY" label="Regroupement" UI="combo" default="-1" width="200" tree="true" visible="false">
|
|
|
<OPTION label="RSS_GROUPBY_OPTIONS" data="" globalListProvider="RSS_GROUPBY_OPTIONS"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="LGROUPBY_2" label="Regroupement" UI="combo" default="-1" width="200" tree="true" visible="false">
|
|
|
<OPTION label="RSS_GROUPBY_OPTIONS" data="" globalListProvider="RSS_GROUPBY_OPTIONS"/>
|
|
|
</FIELD>
|
|
|
<FIELD name="LGROUPBY_3" label="Regroupement" UI="combo" default="-1" width="200" tree="true" visible="false">
|
|
|
<OPTION label="RSS_GROUPBY_OPTIONS" data="" globalListProvider="RSS_GROUPBY_OPTIONS"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
</SELECTIONS>
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SOUSSELECTIONS" />
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SELECTIONS" />
|
|
|
<QUERIES>
|
|
|
<QUERY label="">
|
|
|
<SQL optimizer="V_RSS_X" cacheEnabled="true">
|
|
|
<select><![CDATA[
|
|
|
|
|
|
CTISELECT_TREE
|
|
|
[EVAL
|
|
|
if('[GROUPBY]' != '-1'){
|
|
|
return "
|
|
|
GROUPBY1{[VIEW.SELECT_TABTREE_OID_FIELD],, [VIEW.SELECT_TABTREE_COD_FIELD],, [VIEW.SELECT_TABTREE_TXT_FIELD]}
|
|
|
GROUPBY1MODE{[GROUPBY_TAB]}
|
|
|
GROUPBY2{[VIEW.SELECT_TABTREE_2_OID_FIELD],, [VIEW.SELECT_TABTREE_2_COD_FIELD],, [VIEW.SELECT_TABTREE_2_TXT_FIELD]}
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if('[GROUPBY]' == '-1'){
|
|
|
return "
|
|
|
GROUPBY1{[VIEW.SELECT_TABTREE_2_OID_FIELD],, [VIEW.SELECT_TABTREE_2_COD_FIELD],, [VIEW.SELECT_TABTREE_2_TXT_FIELD]}
|
|
|
GROUPBY1MODE{[GROUPBY_TAB]}
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
SIGNIFDATA{[VIEW.SELECT_TABTREE_ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
|
|
|
OPTIONS{NOTZERO=1}
|
|
|
ORDERBY{[VIEW.DATA1],, DESC}
|
|
|
INDICATORS{
|
|
|
[VIEW.DATA1F],,
|
|
|
[VIEW.DATA1D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA2F],,
|
|
|
[VIEW.DATA2D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA3F],,
|
|
|
[VIEW.DATA3D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA4F],,
|
|
|
[VIEW.DATA4D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA5F],,
|
|
|
[VIEW.DATA5D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA6F],,
|
|
|
[VIEW.DATA6D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA7F],,
|
|
|
[VIEW.DATA7D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA8F],,
|
|
|
[VIEW.DATA8D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA9F],,
|
|
|
[VIEW.DATA9D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA10F],,
|
|
|
[VIEW.DATA10D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA11F],,
|
|
|
[VIEW.DATA11D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA12F],,
|
|
|
[VIEW.DATA12D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA13F],,
|
|
|
[VIEW.DATA13D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA14F],,
|
|
|
[VIEW.DATA14D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA15F],,
|
|
|
[VIEW.DATA15D],,
|
|
|
0,,
|
|
|
0
|
|
|
}
|
|
|
FROM
|
|
|
#V_RSS_X#
|
|
|
WHERE 1=1
|
|
|
AND (
|
|
|
date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'
|
|
|
OR
|
|
|
date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
|
|
|
)
|
|
|
[VIEW.FILTRE_RSS_SELECT]
|
|
|
|
|
|
AFTER{
|
|
|
UPDATE w_table SET
|
|
|
indicateurs[3] = indicateurs[1] - indicateurs[2],
|
|
|
indicateurs[4] = CASE
|
|
|
WHEN indicateurs[1] > 0 AND indicateurs[2] > 0 THEN base.cti_division(indicateurs[1] - indicateurs[2], indicateurs[2]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[7] = indicateurs[5] - indicateurs[6],
|
|
|
indicateurs[8] = CASE
|
|
|
WHEN indicateurs[5] > 0 AND indicateurs[6] > 0 THEN base.cti_division(indicateurs[5] - indicateurs[6], indicateurs[6]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[11] = indicateurs[9] - indicateurs[10],
|
|
|
indicateurs[12] = CASE
|
|
|
WHEN indicateurs[9] > 0 AND indicateurs[10] > 0 THEN base.cti_division(indicateurs[9] - indicateurs[10], indicateurs[10]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[15] = indicateurs[13] - indicateurs[14],
|
|
|
indicateurs[16] = CASE
|
|
|
WHEN indicateurs[13] > 0 AND indicateurs[14] > 0 THEN base.cti_division(indicateurs[13] - indicateurs[14], indicateurs[14]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[19] = indicateurs[17] - indicateurs[18],
|
|
|
indicateurs[20] = CASE
|
|
|
WHEN indicateurs[17] > 0 AND indicateurs[18] > 0 THEN base.cti_division(indicateurs[17] - indicateurs[18], indicateurs[18]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[23] = indicateurs[21] - indicateurs[22],
|
|
|
indicateurs[24] = CASE
|
|
|
WHEN indicateurs[21] > 0 AND indicateurs[22] > 0 THEN base.cti_division(indicateurs[21] - indicateurs[22], indicateurs[22]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[27] = indicateurs[25] - indicateurs[26],
|
|
|
indicateurs[28] = CASE
|
|
|
WHEN indicateurs[25] > 0 AND indicateurs[26] > 0 THEN base.cti_division(indicateurs[25] - indicateurs[26], indicateurs[26]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[31] = indicateurs[29] - indicateurs[30],
|
|
|
indicateurs[32] = CASE
|
|
|
WHEN indicateurs[29] > 0 AND indicateurs[30] > 0 THEN base.cti_division(indicateurs[29] - indicateurs[30], indicateurs[30]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[35] = indicateurs[33] - indicateurs[34],
|
|
|
indicateurs[36] = CASE
|
|
|
WHEN indicateurs[33] > 0 AND indicateurs[34] > 0 THEN base.cti_division(indicateurs[33] - indicateurs[34], indicateurs[34]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[39] = indicateurs[37] - indicateurs[38],
|
|
|
indicateurs[40] = CASE
|
|
|
WHEN indicateurs[37] > 0 AND indicateurs[38] > 0 THEN base.cti_division(indicateurs[37] - indicateurs[38], indicateurs[38]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[43] = indicateurs[41] - indicateurs[42],
|
|
|
indicateurs[44] = CASE
|
|
|
WHEN indicateurs[41] > 0 AND indicateurs[42] > 0 THEN base.cti_division(indicateurs[41] - indicateurs[42], indicateurs[42]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[47] = indicateurs[45] - indicateurs[46],
|
|
|
indicateurs[48] = CASE
|
|
|
WHEN indicateurs[45] > 0 AND indicateurs[46] > 0 THEN base.cti_division(indicateurs[45] - indicateurs[46], indicateurs[46]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[51] = indicateurs[49] - indicateurs[50],
|
|
|
indicateurs[52] = CASE
|
|
|
WHEN indicateurs[49] > 0 AND indicateurs[50] > 0 THEN base.cti_division(indicateurs[49] - indicateurs[50], indicateurs[50]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[55] = indicateurs[53] - indicateurs[54],
|
|
|
indicateurs[56] = CASE
|
|
|
WHEN indicateurs[53] > 0 AND indicateurs[54] > 0 THEN base.cti_division(indicateurs[53] - indicateurs[54], indicateurs[54]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[59] = indicateurs[57] - indicateurs[58],
|
|
|
indicateurs[60] = CASE
|
|
|
WHEN indicateurs[57] > 0 AND indicateurs[58] > 0 THEN base.cti_division(indicateurs[57] - indicateurs[58], indicateurs[58]) * 100
|
|
|
ELSE 0 END
|
|
|
} ;
|
|
|
/**** Query ****/
|
|
|
DELETE FROM w_table WHERE oidt = -9999999 ;
|
|
|
CREATE EXTENSION IF NOT EXISTS tablefunc;
|
|
|
/*** parsing string header text ****/
|
|
|
DROP TABLE IF EXISTS w_header;
|
|
|
CREATE TEMP TABLE w_header AS
|
|
|
SELECT string_to_array('[VIEW.HEADERTEXT]','|') as libelle
|
|
|
;
|
|
|
|
|
|
/* DATA 1 */
|
|
|
DROP TABLE IF EXISTS w_temp0;
|
|
|
CREATE TEMP TABLE w_temp0 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp0 ADD COLUMN libelle varchar(80);
|
|
|
ALTER TABLE w_temp0 ADD COLUMN rang int;
|
|
|
update w_temp0 SET libelle = w_header.libelle[1]
|
|
|
FROM w_header;
|
|
|
update w_temp0 SET rang = 0;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp1;
|
|
|
CREATE TEMP TABLE w_temp1 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[2] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp1 ADD COLUMN libelle text;
|
|
|
update w_temp1 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp1 ADD COLUMN rang int;
|
|
|
update w_temp1 SET rang = 1;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp2;
|
|
|
CREATE TEMP TABLE w_temp2 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[1] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp2 ADD COLUMN libelle text;
|
|
|
update w_temp2 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp2 ADD COLUMN rang int;
|
|
|
update w_temp2 SET rang = 2;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp3;
|
|
|
CREATE TEMP TABLE w_temp3 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[3] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp3 ADD COLUMN libelle text;
|
|
|
update w_temp3 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp3 ADD COLUMN rang int;
|
|
|
update w_temp3 SET rang = 3;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp4;
|
|
|
CREATE TEMP TABLE w_temp4 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[4] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp4 ADD COLUMN libelle text;
|
|
|
update w_temp4 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp4 ADD COLUMN rang int;
|
|
|
update w_temp4 SET rang = 4;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp5;
|
|
|
CREATE TEMP TABLE w_temp5 AS
|
|
|
select * from w_temp0
|
|
|
union
|
|
|
select * from w_temp2
|
|
|
union
|
|
|
select * from w_temp1
|
|
|
UNION
|
|
|
select * from w_temp4
|
|
|
UNION
|
|
|
select * from w_temp3;
|
|
|
|
|
|
/* DATA 2 */
|
|
|
DROP TABLE IF EXISTS w_temp6;
|
|
|
CREATE TEMP TABLE w_temp6 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp6 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp6 ADD COLUMN rang int;
|
|
|
update w_temp6 SET libelle = w_header.libelle[2]
|
|
|
FROM w_header;
|
|
|
update w_temp6 SET rang = 5;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp7;
|
|
|
CREATE TEMP TABLE w_temp7 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[6] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp7 ADD COLUMN libelle text;
|
|
|
update w_temp7 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp7 ADD COLUMN rang int;
|
|
|
update w_temp7 SET rang = 6;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp8;
|
|
|
CREATE TEMP TABLE w_temp8 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[5] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp8 ADD COLUMN libelle text;
|
|
|
update w_temp8 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp8 ADD COLUMN rang int;
|
|
|
update w_temp8 SET rang = 7;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp9;
|
|
|
CREATE TEMP TABLE w_temp9 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[7] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp9 ADD COLUMN libelle text;
|
|
|
update w_temp9 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp9 ADD COLUMN rang int;
|
|
|
update w_temp9 SET rang = 8;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp10;
|
|
|
CREATE TEMP TABLE w_temp10 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[8] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp10 ADD COLUMN libelle text;
|
|
|
update w_temp10 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp10 ADD COLUMN rang int;
|
|
|
update w_temp10 SET rang = 9;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp11;
|
|
|
CREATE TEMP TABLE w_temp11 AS
|
|
|
select * from w_temp6
|
|
|
union
|
|
|
select * from w_temp7
|
|
|
union
|
|
|
select * from w_temp8
|
|
|
UNION
|
|
|
select * from w_temp9
|
|
|
UNION
|
|
|
select * from w_temp10;
|
|
|
|
|
|
/* DATA 3 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp12;
|
|
|
CREATE TEMP TABLE w_temp12 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp12 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp12 ADD COLUMN rang int;
|
|
|
update w_temp12 SET libelle = w_header.libelle[3]
|
|
|
FROM w_header;
|
|
|
update w_temp12 SET rang = 10;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp13;
|
|
|
CREATE TEMP TABLE w_temp13 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[10] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp13 ADD COLUMN libelle text;
|
|
|
update w_temp13 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp13 ADD COLUMN rang int;
|
|
|
update w_temp13 SET rang = 11;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp14;
|
|
|
CREATE TEMP TABLE w_temp14 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[9] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp14 ADD COLUMN libelle text;
|
|
|
update w_temp14 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp14 ADD COLUMN rang int;
|
|
|
update w_temp14 SET rang = 12;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp15;
|
|
|
CREATE TEMP TABLE w_temp15 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[11] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp15 ADD COLUMN libelle text;
|
|
|
update w_temp15 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp15 ADD COLUMN rang int;
|
|
|
update w_temp15 SET rang = 13;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp16;
|
|
|
CREATE TEMP TABLE w_temp16 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[12] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp16 ADD COLUMN libelle text;
|
|
|
update w_temp16 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp16 ADD COLUMN rang int;
|
|
|
update w_temp16 SET rang = 14;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp17;
|
|
|
CREATE TEMP TABLE w_temp17 AS
|
|
|
select * from w_temp12
|
|
|
union
|
|
|
select * from w_temp13
|
|
|
union
|
|
|
select * from w_temp14
|
|
|
UNION
|
|
|
select * from w_temp15
|
|
|
UNION
|
|
|
select * from w_temp16;
|
|
|
|
|
|
|
|
|
|
|
|
/* data 4 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp18;
|
|
|
CREATE TEMP TABLE w_temp18 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp18 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp18 ADD COLUMN rang int;
|
|
|
update w_temp18 SET libelle = w_header.libelle[4]
|
|
|
FROM w_header;
|
|
|
update w_temp18 SET rang = 15;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp19;
|
|
|
CREATE TEMP TABLE w_temp19 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[14] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp19 ADD COLUMN libelle text;
|
|
|
update w_temp19 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp19 ADD COLUMN rang int;
|
|
|
update w_temp19 SET rang = 16;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp20;
|
|
|
CREATE TEMP TABLE w_temp20 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[13] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp20 ADD COLUMN libelle text;
|
|
|
update w_temp20 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp20 ADD COLUMN rang int;
|
|
|
update w_temp20 SET rang = 17;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp21;
|
|
|
CREATE TEMP TABLE w_temp21 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[15] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp21 ADD COLUMN libelle text;
|
|
|
update w_temp21 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp21 ADD COLUMN rang int;
|
|
|
update w_temp21 SET rang = 18;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp22;
|
|
|
CREATE TEMP TABLE w_temp22 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[16] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp22 ADD COLUMN libelle text;
|
|
|
update w_temp22 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp22 ADD COLUMN rang int;
|
|
|
update w_temp22 SET rang = 19;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp23;
|
|
|
CREATE TEMP TABLE w_temp23 AS
|
|
|
select * from w_temp18
|
|
|
union
|
|
|
select * from w_temp19
|
|
|
union
|
|
|
select * from w_temp20
|
|
|
UNION
|
|
|
select * from w_temp21
|
|
|
UNION
|
|
|
select * from w_temp22;
|
|
|
/* data 5 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp24;
|
|
|
CREATE TEMP TABLE w_temp24 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp24 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp24 ADD COLUMN rang int;
|
|
|
update w_temp24 SET libelle = w_header.libelle[5]
|
|
|
FROM w_header;
|
|
|
update w_temp24 SET rang = 20;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp25;
|
|
|
CREATE TEMP TABLE w_temp25 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[18] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp25 ADD COLUMN libelle text;
|
|
|
update w_temp25 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp25 ADD COLUMN rang int;
|
|
|
update w_temp25 SET rang = 21;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp26;
|
|
|
CREATE TEMP TABLE w_temp26 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[17] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp26 ADD COLUMN libelle text;
|
|
|
update w_temp26 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp26 ADD COLUMN rang int;
|
|
|
update w_temp26 SET rang = 22;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp27;
|
|
|
CREATE TEMP TABLE w_temp27 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[19] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp27 ADD COLUMN libelle text;
|
|
|
update w_temp27 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp27 ADD COLUMN rang int;
|
|
|
update w_temp27 SET rang = 23;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp28;
|
|
|
CREATE TEMP TABLE w_temp28 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[20] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp28 ADD COLUMN libelle text;
|
|
|
update w_temp28 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp28 ADD COLUMN rang int;
|
|
|
update w_temp28 SET rang = 24;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp29;
|
|
|
CREATE TEMP TABLE w_temp29 AS
|
|
|
select * from w_temp24
|
|
|
union
|
|
|
select * from w_temp25
|
|
|
union
|
|
|
select * from w_temp26
|
|
|
UNION
|
|
|
select * from w_temp27
|
|
|
UNION
|
|
|
select * from w_temp28;
|
|
|
|
|
|
/* data 6 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp30;
|
|
|
CREATE TEMP TABLE w_temp30 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp30 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp30 ADD COLUMN rang int;
|
|
|
update w_temp30 SET libelle = w_header.libelle[6]
|
|
|
FROM w_header;
|
|
|
update w_temp30 SET rang = 25;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp31;
|
|
|
CREATE TEMP TABLE w_temp31 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[22] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp31 ADD COLUMN libelle text;
|
|
|
update w_temp31 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp31 ADD COLUMN rang int;
|
|
|
update w_temp31 SET rang = 26;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp32;
|
|
|
CREATE TEMP TABLE w_temp32 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[21] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp32 ADD COLUMN libelle text;
|
|
|
update w_temp32 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp32 ADD COLUMN rang int;
|
|
|
update w_temp32 SET rang = 27;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp33;
|
|
|
CREATE TEMP TABLE w_temp33 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[23] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp33 ADD COLUMN libelle text;
|
|
|
update w_temp33 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp33 ADD COLUMN rang int;
|
|
|
update w_temp33 SET rang = 28;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp34;
|
|
|
CREATE TEMP TABLE w_temp34 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[24] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp34 ADD COLUMN libelle text;
|
|
|
update w_temp34 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp34 ADD COLUMN rang int;
|
|
|
update w_temp34 SET rang = 29;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp35;
|
|
|
CREATE TEMP TABLE w_temp35 AS
|
|
|
select * from w_temp30
|
|
|
union
|
|
|
select * from w_temp31
|
|
|
union
|
|
|
select * from w_temp32
|
|
|
UNION
|
|
|
select * from w_temp33
|
|
|
UNION
|
|
|
select * from w_temp34;
|
|
|
/* data 7 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp36;
|
|
|
CREATE TEMP TABLE w_temp36 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp36 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp36 ADD COLUMN rang int;
|
|
|
update w_temp36 SET libelle = w_header.libelle[7]
|
|
|
FROM w_header;
|
|
|
update w_temp36 SET rang = 30;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp37;
|
|
|
CREATE TEMP TABLE w_temp37 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[26] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp37 ADD COLUMN libelle text;
|
|
|
update w_temp37 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp37 ADD COLUMN rang int;
|
|
|
update w_temp37 SET rang = 31;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp38;
|
|
|
CREATE TEMP TABLE w_temp38 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[25] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp38 ADD COLUMN libelle text;
|
|
|
update w_temp38 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp38 ADD COLUMN rang int;
|
|
|
update w_temp38 SET rang = 32;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp39;
|
|
|
CREATE TEMP TABLE w_temp39 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[27] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp39 ADD COLUMN libelle text;
|
|
|
update w_temp39 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp39 ADD COLUMN rang int;
|
|
|
update w_temp39 SET rang = 33;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp40;
|
|
|
CREATE TEMP TABLE w_temp40 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[28] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp40 ADD COLUMN libelle text;
|
|
|
update w_temp40 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp40 ADD COLUMN rang int;
|
|
|
update w_temp40 SET rang = 34;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp41;
|
|
|
CREATE TEMP TABLE w_temp41 AS
|
|
|
select * from w_temp36
|
|
|
union
|
|
|
select * from w_temp37
|
|
|
union
|
|
|
select * from w_temp38
|
|
|
UNION
|
|
|
select * from w_temp39
|
|
|
UNION
|
|
|
select * from w_temp40;
|
|
|
|
|
|
/* data 8 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp42;
|
|
|
CREATE TEMP TABLE w_temp42 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp42 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp42 ADD COLUMN rang int;
|
|
|
update w_temp42 SET libelle = w_header.libelle[8]
|
|
|
FROM w_header;
|
|
|
update w_temp42 SET rang = 35;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp43;
|
|
|
CREATE TEMP TABLE w_temp43 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[30] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp43 ADD COLUMN libelle text;
|
|
|
update w_temp43 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp43 ADD COLUMN rang int;
|
|
|
update w_temp43 SET rang = 36;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp44;
|
|
|
CREATE TEMP TABLE w_temp44 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[29] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp44 ADD COLUMN libelle text;
|
|
|
update w_temp44 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp44 ADD COLUMN rang int;
|
|
|
update w_temp44 SET rang = 37;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp45;
|
|
|
CREATE TEMP TABLE w_temp45 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[31] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp45 ADD COLUMN libelle text;
|
|
|
update w_temp45 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp45 ADD COLUMN rang int;
|
|
|
update w_temp45 SET rang = 38;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp46;
|
|
|
CREATE TEMP TABLE w_temp46 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[32] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp46 ADD COLUMN libelle text;
|
|
|
update w_temp46 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp46 ADD COLUMN rang int;
|
|
|
update w_temp46 SET rang = 39;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp47;
|
|
|
CREATE TEMP TABLE w_temp47 AS
|
|
|
select * from w_temp42
|
|
|
union
|
|
|
select * from w_temp43
|
|
|
union
|
|
|
select * from w_temp44
|
|
|
UNION
|
|
|
select * from w_temp45
|
|
|
UNION
|
|
|
select * from w_temp46;
|
|
|
/* DATA 9 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp48;
|
|
|
CREATE TEMP TABLE w_temp48 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp48 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp48 ADD COLUMN rang int;
|
|
|
update w_temp48 SET libelle = w_header.libelle[9]
|
|
|
FROM w_header;
|
|
|
update w_temp48 SET rang = 40;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp49;
|
|
|
CREATE TEMP TABLE w_temp49 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[34] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp49 ADD COLUMN libelle text;
|
|
|
update w_temp49 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp49 ADD COLUMN rang int;
|
|
|
update w_temp49 SET rang = 41;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp50;
|
|
|
CREATE TEMP TABLE w_temp50 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[33] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp50 ADD COLUMN libelle text;
|
|
|
update w_temp50 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp50 ADD COLUMN rang int;
|
|
|
update w_temp50 SET rang = 42;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp51;
|
|
|
CREATE TEMP TABLE w_temp51 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[35] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp51 ADD COLUMN libelle text;
|
|
|
update w_temp51 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp51 ADD COLUMN rang int;
|
|
|
update w_temp51 SET rang = 43;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp52;
|
|
|
CREATE TEMP TABLE w_temp52 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[36] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp52 ADD COLUMN libelle text;
|
|
|
update w_temp52 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp52 ADD COLUMN rang int;
|
|
|
update w_temp52 SET rang = 44;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp53;
|
|
|
CREATE TEMP TABLE w_temp53 AS
|
|
|
select * from w_temp48
|
|
|
union
|
|
|
select * from w_temp49
|
|
|
union
|
|
|
select * from w_temp50
|
|
|
UNION
|
|
|
select * from w_temp51
|
|
|
UNION
|
|
|
select * from w_temp52;
|
|
|
|
|
|
/* DATA 10 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp54;
|
|
|
CREATE TEMP TABLE w_temp54 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp54 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp54 ADD COLUMN rang int;
|
|
|
update w_temp54 SET libelle = w_header.libelle[9]
|
|
|
FROM w_header;
|
|
|
update w_temp54 SET rang = 45;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp55;
|
|
|
CREATE TEMP TABLE w_temp55 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[38] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp55 ADD COLUMN libelle text;
|
|
|
update w_temp55 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp55 ADD COLUMN rang int;
|
|
|
update w_temp55 SET rang = 46;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp56;
|
|
|
CREATE TEMP TABLE w_temp56 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[37] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp56 ADD COLUMN libelle text;
|
|
|
update w_temp56 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp56 ADD COLUMN rang int;
|
|
|
update w_temp56 SET rang = 47;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp57;
|
|
|
CREATE TEMP TABLE w_temp57 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[39] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp57 ADD COLUMN libelle text;
|
|
|
update w_temp57 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp57 ADD COLUMN rang int;
|
|
|
update w_temp57 SET rang = 48;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp58;
|
|
|
CREATE TEMP TABLE w_temp58 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[40] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp58 ADD COLUMN libelle text;
|
|
|
update w_temp58 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp58 ADD COLUMN rang int;
|
|
|
update w_temp58 SET rang = 49;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp59;
|
|
|
CREATE TEMP TABLE w_temp59 AS
|
|
|
select * from w_temp54
|
|
|
union
|
|
|
select * from w_temp55
|
|
|
union
|
|
|
select * from w_temp56
|
|
|
UNION
|
|
|
select * from w_temp57
|
|
|
UNION
|
|
|
select * from w_temp58;
|
|
|
|
|
|
/*DATA 11*/
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp60;
|
|
|
CREATE TEMP TABLE w_temp60 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp60 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp60 ADD COLUMN rang int;
|
|
|
update w_temp60 SET libelle = w_header.libelle[11]
|
|
|
FROM w_header;
|
|
|
update w_temp60 SET rang = 50;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp61;
|
|
|
CREATE TEMP TABLE w_temp61 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[42] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp61 ADD COLUMN libelle text;
|
|
|
update w_temp61 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp61 ADD COLUMN rang int;
|
|
|
update w_temp61 SET rang = 51;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp62;
|
|
|
CREATE TEMP TABLE w_temp62 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[41] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp62 ADD COLUMN libelle text;
|
|
|
update w_temp62 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp62 ADD COLUMN rang int;
|
|
|
update w_temp62 SET rang = 52;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp63;
|
|
|
CREATE TEMP TABLE w_temp63 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[43] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp63 ADD COLUMN libelle text;
|
|
|
update w_temp63 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp63 ADD COLUMN rang int;
|
|
|
update w_temp63 SET rang = 53;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp64;
|
|
|
CREATE TEMP TABLE w_temp64 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[44] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp64 ADD COLUMN libelle text;
|
|
|
update w_temp64 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp64 ADD COLUMN rang int;
|
|
|
update w_temp64 SET rang = 54;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp65;
|
|
|
CREATE TEMP TABLE w_temp65 AS
|
|
|
select * from w_temp60
|
|
|
union
|
|
|
select * from w_temp61
|
|
|
union
|
|
|
select * from w_temp62
|
|
|
UNION
|
|
|
select * from w_temp63
|
|
|
UNION
|
|
|
select * from w_temp64;
|
|
|
|
|
|
/* DATA 12 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp66;
|
|
|
CREATE TEMP TABLE w_temp66 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp66 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp66 ADD COLUMN rang int;
|
|
|
update w_temp66 SET libelle = w_header.libelle[12]
|
|
|
FROM w_header;
|
|
|
update w_temp66 SET rang = 55;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp67;
|
|
|
CREATE TEMP TABLE w_temp67 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[46] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp67 ADD COLUMN libelle text;
|
|
|
update w_temp67 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp67 ADD COLUMN rang int;
|
|
|
update w_temp67 SET rang = 56;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp68;
|
|
|
CREATE TEMP TABLE w_temp68 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[45] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp68 ADD COLUMN libelle text;
|
|
|
update w_temp68 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp68 ADD COLUMN rang int;
|
|
|
update w_temp68 SET rang = 57;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp69;
|
|
|
CREATE TEMP TABLE w_temp69 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[47] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp69 ADD COLUMN libelle text;
|
|
|
update w_temp69 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp69 ADD COLUMN rang int;
|
|
|
update w_temp69 SET rang = 58;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp70;
|
|
|
CREATE TEMP TABLE w_temp70 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[48] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp70 ADD COLUMN libelle text;
|
|
|
update w_temp70 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp70 ADD COLUMN rang int;
|
|
|
update w_temp70 SET rang = 59;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp71;
|
|
|
CREATE TEMP TABLE w_temp71 AS
|
|
|
select * from w_temp66
|
|
|
union
|
|
|
select * from w_temp67
|
|
|
union
|
|
|
select * from w_temp68
|
|
|
UNION
|
|
|
select * from w_temp69
|
|
|
UNION
|
|
|
select * from w_temp70;
|
|
|
/* DATA 13 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp72;
|
|
|
CREATE TEMP TABLE w_temp72 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp72 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp72 ADD COLUMN rang int;
|
|
|
update w_temp72 SET libelle = w_header.libelle[13]
|
|
|
FROM w_header;
|
|
|
update w_temp72 SET rang = 60;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp73;
|
|
|
CREATE TEMP TABLE w_temp73 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[50] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp73 ADD COLUMN libelle text;
|
|
|
update w_temp73 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp73 ADD COLUMN rang int;
|
|
|
update w_temp73 SET rang = 61;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp74;
|
|
|
CREATE TEMP TABLE w_temp74 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[49] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp74 ADD COLUMN libelle text;
|
|
|
update w_temp74 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp74 ADD COLUMN rang int;
|
|
|
update w_temp74 SET rang = 62;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp75;
|
|
|
CREATE TEMP TABLE w_temp75 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[51] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp75 ADD COLUMN libelle text;
|
|
|
update w_temp75 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp75 ADD COLUMN rang int;
|
|
|
update w_temp75 SET rang = 63;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp76;
|
|
|
CREATE TEMP TABLE w_temp76 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[52] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp76 ADD COLUMN libelle text;
|
|
|
update w_temp76 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp76 ADD COLUMN rang int;
|
|
|
update w_temp76 SET rang = 64;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp77;
|
|
|
CREATE TEMP TABLE w_temp77 AS
|
|
|
select * from w_temp72
|
|
|
union
|
|
|
select * from w_temp73
|
|
|
union
|
|
|
select * from w_temp74
|
|
|
UNION
|
|
|
select * from w_temp75
|
|
|
UNION
|
|
|
select * from w_temp76;
|
|
|
/* DATA 14 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp78;
|
|
|
CREATE TEMP TABLE w_temp78 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp78 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp78 ADD COLUMN rang int;
|
|
|
update w_temp78 SET libelle = w_header.libelle[14]
|
|
|
FROM w_header;
|
|
|
update w_temp78 SET rang = 65;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp79;
|
|
|
CREATE TEMP TABLE w_temp79 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[54] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp79 ADD COLUMN libelle text;
|
|
|
update w_temp79 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp79 ADD COLUMN rang int;
|
|
|
update w_temp79 SET rang = 66;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp80;
|
|
|
CREATE TEMP TABLE w_temp80 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[53] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp80 ADD COLUMN libelle text;
|
|
|
update w_temp80 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp80 ADD COLUMN rang int;
|
|
|
update w_temp80 SET rang = 67;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp81;
|
|
|
CREATE TEMP TABLE w_temp81 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[55] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp81 ADD COLUMN libelle text;
|
|
|
update w_temp81 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp81 ADD COLUMN rang int;
|
|
|
update w_temp81 SET rang = 68;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp82;
|
|
|
CREATE TEMP TABLE w_temp82 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[56] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp82 ADD COLUMN libelle text;
|
|
|
update w_temp82 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp82 ADD COLUMN rang int;
|
|
|
update w_temp82 SET rang = 69;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp83;
|
|
|
CREATE TEMP TABLE w_temp83 AS
|
|
|
select * from w_temp78
|
|
|
union
|
|
|
select * from w_temp79
|
|
|
union
|
|
|
select * from w_temp80
|
|
|
UNION
|
|
|
select * from w_temp81
|
|
|
UNION
|
|
|
select * from w_temp82;
|
|
|
/* DATA 15 */
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp84;
|
|
|
CREATE TEMP TABLE w_temp84 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[0] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
ALTER TABLE w_temp84 ADD COLUMN libelle text;
|
|
|
ALTER TABLE w_temp84 ADD COLUMN rang int;
|
|
|
update w_temp84 SET libelle = w_header.libelle[15]
|
|
|
FROM w_header;
|
|
|
update w_temp84 SET rang = 70;
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp85;
|
|
|
CREATE TEMP TABLE w_temp85 AS
|
|
|
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[58] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
)
|
|
|
|
|
|
;
|
|
|
|
|
|
ALTER TABLE w_temp85 ADD COLUMN libelle text;
|
|
|
update w_temp85 SET libelle = 'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5);
|
|
|
ALTER TABLE w_temp85 ADD COLUMN rang int;
|
|
|
update w_temp85 SET rang = 71;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp86;
|
|
|
CREATE TEMP TABLE w_temp86 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[57] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
|
|
|
ALTER TABLE w_temp86 ADD COLUMN libelle text;
|
|
|
update w_temp86 SET libelle = 'Année ' || SUBSTR('[PERIODE]',0,5);
|
|
|
ALTER TABLE w_temp86 ADD COLUMN rang int;
|
|
|
update w_temp86 SET rang = 72;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp87;
|
|
|
CREATE TEMP TABLE w_temp87 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[59] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp87 ADD COLUMN libelle text;
|
|
|
update w_temp87 SET libelle = 'ECART N-1';
|
|
|
ALTER TABLE w_temp87 ADD COLUMN rang int;
|
|
|
update w_temp87 SET rang = 73;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp88;
|
|
|
CREATE TEMP TABLE w_temp88 AS
|
|
|
select * from crosstab(
|
|
|
'SELECT oidt,oid,indicateurs[60] FROM w_table ORDER BY labelt,oidt,code1,oid1,code2,oid2,code3,oid3 '
|
|
|
) AS (
|
|
|
|
|
|
oidt bigint,"Total" numeric,"Jan" numeric, "Fev" numeric, "Mar" numeric, "Avr" numeric, "Mai" numeric, "Juin" numeric, "Juil" numeric, "Aout" numeric, "Sep" numeric, "Oct" numeric, "Nov" numeric, "Dec" numeric
|
|
|
);
|
|
|
|
|
|
ALTER TABLE w_temp88 ADD COLUMN libelle text;
|
|
|
update w_temp88 SET libelle = '% N-1';
|
|
|
ALTER TABLE w_temp88 ADD COLUMN rang int;
|
|
|
update w_temp88 SET rang = 74;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp89;
|
|
|
CREATE TEMP TABLE w_temp89 AS
|
|
|
select * from w_temp84
|
|
|
union
|
|
|
select * from w_temp85
|
|
|
union
|
|
|
select * from w_temp86
|
|
|
UNION
|
|
|
select * from w_temp87
|
|
|
UNION
|
|
|
select * from w_temp88;
|
|
|
|
|
|
delete from w_table where oid <> -9999999 ;
|
|
|
|
|
|
|
|
|
|
|
|
( select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
FROM w_temp5
|
|
|
JOIN w_table ON w_table.oidt = w_temp5.oidt
|
|
|
WHERE rang < '[VIEW.NB_DATA]'
|
|
|
ORDER BY w_temp5.rang ASC
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp11
|
|
|
join w_table on w_table.oidt = w_temp11.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp11.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp17
|
|
|
join w_table on w_table.oidt = w_temp17.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp17.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp23
|
|
|
join w_table on w_table.oidt = w_temp23.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp23.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp29
|
|
|
join w_table on w_table.oidt = w_temp29.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp29.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp35
|
|
|
join w_table on w_table.oidt = w_temp35.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp35.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp41
|
|
|
join w_table on w_table.oidt = w_temp41.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp41.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp47
|
|
|
join w_table on w_table.oidt = w_temp47.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp47.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp53
|
|
|
join w_table on w_table.oidt = w_temp53.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp53.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp59 join w_table on w_table.oidt = w_temp59.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp59.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp65
|
|
|
join w_table on w_table.oidt = w_temp65.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp65.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp71
|
|
|
join w_table on w_table.oidt = w_temp71.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp71.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp77
|
|
|
join w_table on w_table.oidt = w_temp77.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp77.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp83
|
|
|
join w_table on w_table.oidt = w_temp83.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp83.rang asc
|
|
|
)
|
|
|
union
|
|
|
(
|
|
|
select w_table.oidt,labelt, textet, oid1, code1, oid2, code2, oid3, code3, oid, code, texte, level,rang,libelle,*
|
|
|
from w_temp89
|
|
|
join w_table on w_table.oidt = w_temp89.oidt
|
|
|
where rang < '[VIEW.NB_DATA]'
|
|
|
order by w_temp89.rang asc
|
|
|
) order by 1,14;
|
|
|
|
|
|
|
|
|
]]> </select>
|
|
|
<FIELDS>
|
|
|
<INSERT name="CTISELECT_TREE_FIELDS"/>
|
|
|
<FIELD name="NN"/>
|
|
|
<FIELD name="N"/>
|
|
|
<FIELD name="N0"/>
|
|
|
<FIELD name="N1"/>
|
|
|
<FIELD name="N2"/>
|
|
|
<FIELD name="N3"/>
|
|
|
<FIELD name="N4"/>
|
|
|
<FIELD name="N5"/>
|
|
|
<FIELD name="N6"/>
|
|
|
<FIELD name="N7"/>
|
|
|
<FIELD name="N8"/>
|
|
|
<FIELD name="N9"/>
|
|
|
<FIELD name="N10"/>
|
|
|
<FIELD name="N11"/>
|
|
|
<FIELD name="N12"/>
|
|
|
<FIELD name="N13"/>
|
|
|
<FIELD name="N14"/>
|
|
|
<FIELD name="N15"/>
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</QUERY>
|
|
|
<QUERY label="">
|
|
|
<SQL optimizer="V_RSS_X" cacheEnabled="true">
|
|
|
<select><![CDATA[
|
|
|
|
|
|
CTISELECT_TREE
|
|
|
[EVAL
|
|
|
if('[GROUPBY]' != '-1'){
|
|
|
return "
|
|
|
GROUPBY1{[VIEW.SELECT_TABTREE_2_OID_FIELD],, [VIEW.SELECT_TABTREE_2_COD_FIELD],, [VIEW.SELECT_TABTREE_2_TXT_FIELD]}
|
|
|
GROUPBY1MODE{[GROUPBY_TAB]}
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if('[GROUPBY]' == '-1'){
|
|
|
return "
|
|
|
GROUPBY1{[VIEW.SELECT_TABTREE_OID_FIELD],, [VIEW.SELECT_TABTREE_COD_FIELD],, [VIEW.SELECT_TABTREE_TXT_FIELD]}
|
|
|
GROUPBY1MODE{[GROUPBY_TAB]}
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
SIGNIFDATA{[VIEW.SELECT_TABTREE_ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
|
|
|
OPTIONS{NOTZERO=1}
|
|
|
ORDERBY{[VIEW.ORDERBY],, DESC}
|
|
|
INDICATORS{
|
|
|
[VIEW.DATA1F],,
|
|
|
[VIEW.DATA1D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA2F],,
|
|
|
[VIEW.DATA2D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA3F],,
|
|
|
[VIEW.DATA3D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA4F],,
|
|
|
[VIEW.DATA4D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA5F],,
|
|
|
[VIEW.DATA5D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA6F],,
|
|
|
[VIEW.DATA6D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA7F],,
|
|
|
[VIEW.DATA7D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA8F],,
|
|
|
[VIEW.DATA8D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA9F],,
|
|
|
[VIEW.DATA9D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA10F],,
|
|
|
[VIEW.DATA10D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA11F],,
|
|
|
[VIEW.DATA11D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA12F],,
|
|
|
[VIEW.DATA12D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA13F],,
|
|
|
[VIEW.DATA13D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA14F],,
|
|
|
[VIEW.DATA14D],,
|
|
|
0,,
|
|
|
0,,
|
|
|
[VIEW.DATA15F],,
|
|
|
[VIEW.DATA15D],,
|
|
|
0,,
|
|
|
0
|
|
|
}
|
|
|
FROM
|
|
|
#V_RSS_X#
|
|
|
WHERE 1=1
|
|
|
AND (
|
|
|
date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'
|
|
|
OR
|
|
|
date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
|
|
|
)
|
|
|
[VIEW.FILTRE_RSS_SELECT]
|
|
|
|
|
|
AFTER{
|
|
|
UPDATE w_table SET
|
|
|
indicateurs[3] = indicateurs[1] - indicateurs[2],
|
|
|
indicateurs[4] = CASE
|
|
|
WHEN indicateurs[1] > 0 AND indicateurs[2] > 0 THEN base.cti_division(indicateurs[1] - indicateurs[2], indicateurs[2]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[7] = indicateurs[5] - indicateurs[6],
|
|
|
indicateurs[8] = CASE
|
|
|
WHEN indicateurs[5] > 0 AND indicateurs[6] > 0 THEN base.cti_division(indicateurs[5] - indicateurs[6], indicateurs[6]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[11] = indicateurs[9] - indicateurs[10],
|
|
|
indicateurs[12] = CASE
|
|
|
WHEN indicateurs[9] > 0 AND indicateurs[10] > 0 THEN base.cti_division(indicateurs[9] - indicateurs[10], indicateurs[10]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[15] = indicateurs[13] - indicateurs[14],
|
|
|
indicateurs[16] = CASE
|
|
|
WHEN indicateurs[13] > 0 AND indicateurs[14] > 0 THEN base.cti_division(indicateurs[13] - indicateurs[14], indicateurs[14]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[19] = indicateurs[17] - indicateurs[18],
|
|
|
indicateurs[20] = CASE
|
|
|
WHEN indicateurs[17] > 0 AND indicateurs[18] > 0 THEN base.cti_division(indicateurs[17] - indicateurs[18], indicateurs[18]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[23] = indicateurs[21] - indicateurs[22],
|
|
|
indicateurs[24] = CASE
|
|
|
WHEN indicateurs[21] > 0 AND indicateurs[22] > 0 THEN base.cti_division(indicateurs[21] - indicateurs[22], indicateurs[22]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[27] = indicateurs[25] - indicateurs[26],
|
|
|
indicateurs[28] = CASE
|
|
|
WHEN indicateurs[25] > 0 AND indicateurs[26] > 0 THEN base.cti_division(indicateurs[25] - indicateurs[26], indicateurs[26]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[31] = indicateurs[29] - indicateurs[30],
|
|
|
indicateurs[32] = CASE
|
|
|
WHEN indicateurs[29] > 0 AND indicateurs[30] > 0 THEN base.cti_division(indicateurs[29] - indicateurs[30], indicateurs[30]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[35] = indicateurs[33] - indicateurs[34],
|
|
|
indicateurs[36] = CASE
|
|
|
WHEN indicateurs[33] > 0 AND indicateurs[34] > 0 THEN base.cti_division(indicateurs[33] - indicateurs[34], indicateurs[34]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[39] = indicateurs[37] - indicateurs[38],
|
|
|
indicateurs[40] = CASE
|
|
|
WHEN indicateurs[37] > 0 AND indicateurs[38] > 0 THEN base.cti_division(indicateurs[37] - indicateurs[38], indicateurs[38]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[43] = indicateurs[41] - indicateurs[42],
|
|
|
indicateurs[44] = CASE
|
|
|
WHEN indicateurs[41] > 0 AND indicateurs[42] > 0 THEN base.cti_division(indicateurs[41] - indicateurs[42], indicateurs[42]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[47] = indicateurs[45] - indicateurs[46],
|
|
|
indicateurs[48] = CASE
|
|
|
WHEN indicateurs[45] > 0 AND indicateurs[46] > 0 THEN base.cti_division(indicateurs[45] - indicateurs[46], indicateurs[46]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[51] = indicateurs[49] - indicateurs[50],
|
|
|
indicateurs[52] = CASE
|
|
|
WHEN indicateurs[49] > 0 AND indicateurs[50] > 0 THEN base.cti_division(indicateurs[49] - indicateurs[50], indicateurs[50]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[55] = indicateurs[53] - indicateurs[54],
|
|
|
indicateurs[56] = CASE
|
|
|
WHEN indicateurs[53] > 0 AND indicateurs[54] > 0 THEN base.cti_division(indicateurs[53] - indicateurs[54], indicateurs[54]) * 100
|
|
|
ELSE 0 END,
|
|
|
indicateurs[59] = indicateurs[57] - indicateurs[58],
|
|
|
indicateurs[60] = CASE
|
|
|
WHEN indicateurs[57] > 0 AND indicateurs[58] > 0 THEN base.cti_division(indicateurs[57] - indicateurs[58], indicateurs[58]) * 100
|
|
|
ELSE 0 END
|
|
|
} ;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_header;
|
|
|
CREATE TEMP TABLE w_header AS
|
|
|
SELECT string_to_array('[VIEW.HEADERTEXT]','|') as libelle;
|
|
|
|
|
|
DROP TABLE IF EXISTS w_temp1;
|
|
|
CREATE TEMP TABLE w_temp1 AS
|
|
|
|
|
|
select
|
|
|
0 as rang,
|
|
|
(SELECT libelle[1] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02'),
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06'),
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08'),
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
1 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [2] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [2] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [2] as Fevrier from w_table where level <>9 and code1 ilike '%02'),
|
|
|
(select indicateurs [2] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [2] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [2] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [2] as Juin from w_table where level <>9 and code1 ilike '%06'),
|
|
|
(select indicateurs [2] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [2] as Aout from w_table where level <>9 and code1 ilike '%08'),
|
|
|
(select indicateurs [2] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [2] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [2] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [2] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
2 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [1] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [1] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [1] as Fevrier from w_table where level <>9 and code1 ilike '%02'),
|
|
|
(select indicateurs [1] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [1] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [1] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [1] as Juin from w_table where level <>9 and code1 ilike '%06'),
|
|
|
(select indicateurs [1] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [1] as Aout from w_table where level <>9 and code1 ilike '%08'),
|
|
|
(select indicateurs [1] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [1] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [1] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [1] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
3 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
((select indicateurs [1] as total from w_table where level = 9 ) - (select indicateurs [2] as total from w_table where level = 9 )),
|
|
|
((select indicateurs [1] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [2] as Janvier from w_table where level <>9 and code1 ilike '%01')),
|
|
|
((select indicateurs [1] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [2] as Fevrier from w_table where level <>9 and code1 ilike '%02')),
|
|
|
((select indicateurs [1] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [2] as Mars from w_table where level <>9 and code1 ilike '%03')) ,
|
|
|
((select indicateurs [1] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [2] as Avril from w_table where level <>9 and code1 ilike '%04')),
|
|
|
((select indicateurs [1] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [2] as Mai from w_table where level <>9 and code1 ilike '%05')),
|
|
|
((select indicateurs [1] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [2] as Juin from w_table where level <>9 and code1 ilike '%06')),
|
|
|
((select indicateurs [1] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [2] as Juillet from w_table where level <>9 and code1 ilike '%07')) ,
|
|
|
((select indicateurs [1] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [2] as Aout from w_table where level <>9 and code1 ilike '%08')) ,
|
|
|
((select indicateurs [1] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [2] as Septembre from w_table where level <>9 and code1 ilike '%09')),
|
|
|
((select indicateurs [1] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [2] as Octobre from w_table where level <>9 and code1 ilike '%10')),
|
|
|
((select indicateurs [1] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [2] as Novembre from w_table where level <>9 and code1 ilike '%11')),
|
|
|
((select indicateurs [1] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [2] as Decembre from w_table where level <>9 and code1 ilike '%12'))
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
4 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [1] as total from w_table where level = 9 ) - (select indicateurs [2] as total from w_table where level = 9 ))*100, (select indicateurs [2] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [2] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [2] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [2] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [2] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [2] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [2] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [2] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [2] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [2] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [2] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [2] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [2] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [2] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [2] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [2] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [2] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [2] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100, (select indicateurs [2] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [2] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [2] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [1] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [2] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [2] as Novembre from w_table where level <>9 and code1 ilike '%11')),0),
|
|
|
round(base.cti_division(((select indicateurs [1] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [2] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [2] as Decembre from w_table where level <>9 and code1 ilike '%12')),0)
|
|
|
|
|
|
|
|
|
|
|
|
[EVAL
|
|
|
if ('[DATA2]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
5 as rang,
|
|
|
(SELECT libelle[2] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
6 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [6] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [6] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [6] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [6] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [6] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [6] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [6] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [6] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [6] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [6] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [6] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [6] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [6] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
7 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [5] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [5] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [5] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [5] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [5] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [5] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [5] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [5] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [5] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [5] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [5] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [5] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [5] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
8 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [5] as total from w_table where level = 9 ) - (select indicateurs [6] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [5] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [6] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [5] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [6] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [5] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [6] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [5] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [6] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [5] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [6] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [5] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [6] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [5] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [6] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [5] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [6] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [5] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [6] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [5] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [6] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [5] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [6] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [5] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [6] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
9 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [5] as total from w_table where level = 9 ) - (select indicateurs [6] as total from w_table where level = 9 ))*100,(select indicateurs [6] as total from w_table where level = 9 )),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [6] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100,(select indicateurs [6] as Janvier from w_table where level <>9 and code1 ilike '%01')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [6] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100,(select indicateurs [6] as Fevrier from w_table where level <>9 and code1 ilike '%02')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [6] as Mars from w_table where level <>9 and code1 ilike '%03'))*100,(select indicateurs [6] as Mars from w_table where level <>9 and code1 ilike '%03')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [6] as Avril from w_table where level <>9 and code1 ilike '%04'))*100,(select indicateurs [6] as Avril from w_table where level <>9 and code1 ilike '%04')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [6] as Mai from w_table where level <>9 and code1 ilike '%05'))*100,(select indicateurs [6] as Mai from w_table where level <>9 and code1 ilike '%05')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [6] as Juin from w_table where level <>9 and code1 ilike '%06'))*100,(select indicateurs [6] as Juin from w_table where level <>9 and code1 ilike '%06')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [6] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [6] as Juillet from w_table where level <>9 and code1 ilike '%07')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [6] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [6] as Aout from w_table where level <>9 and code1 ilike '%08')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [6] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [6] as Septembre from w_table where level <>9 and code1 ilike '%09')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [6] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100,(select indicateurs [6] as Octobre from w_table where level <>9 and code1 ilike '%10')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [6] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100,(select indicateurs [6] as Novembre from w_table where level <>9 and code1 ilike '%11')),0),
|
|
|
round(base.cti_division(((select indicateurs [5] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [6] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100,(select indicateurs [6] as Decembre from w_table where level <>9 and code1 ilike '%12')),0)
|
|
|
|
|
|
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA3]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
10 as rang,
|
|
|
(SELECT libelle[3] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
11 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [10] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [10] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [10] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [10] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [10] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [10] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [10] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [10] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [10] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [10] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [10] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [10] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [10] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
12 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [9] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [9] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [9] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [9] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [9] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [9] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [9] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [9] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [9] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [9] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [9] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [9] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [9] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
13 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [9] as total from w_table where level = 9 ) - (select indicateurs [10] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [9] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [10] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [9] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [10] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [9] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [10] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [9] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [10] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [9] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [10] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [9] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [10] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [9] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [10] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [9] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [10] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [9] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [10] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [9] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [10] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [9] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [10] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [9] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [10] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
14 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [9] as total from w_table where level = 9 ) - (select indicateurs [10] as total from w_table where level = 9 ))*100,(select indicateurs [10] as total from w_table where level = 9 )),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [10] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100,(select indicateurs [10] as Janvier from w_table where level <>9 and code1 ilike '%01')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [10] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100,(select indicateurs [10] as Fevrier from w_table where level <>9 and code1 ilike '%02')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [10] as Mars from w_table where level <>9 and code1 ilike '%03'))*100,(select indicateurs [10] as Mars from w_table where level <>9 and code1 ilike '%03')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [10] as Avril from w_table where level <>9 and code1 ilike '%04'))*100,(select indicateurs [10] as Avril from w_table where level <>9 and code1 ilike '%04')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [10] as Mai from w_table where level <>9 and code1 ilike '%05'))*100,(select indicateurs [10] as Mai from w_table where level <>9 and code1 ilike '%05')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [10] as Juin from w_table where level <>9 and code1 ilike '%06'))*100,(select indicateurs [10] as Juin from w_table where level <>9 and code1 ilike '%06')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [10] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [10] as Juillet from w_table where level <>9 and code1 ilike '%07')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [10] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [10] as Aout from w_table where level <>9 and code1 ilike '%08')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [10] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [10] as Septembre from w_table where level <>9 and code1 ilike '%09')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [10] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100,(select indicateurs [10] as Octobre from w_table where level <>9 and code1 ilike '%10')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [10] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100,(select indicateurs [10] as Novembre from w_table where level <>9 and code1 ilike '%11')),0),
|
|
|
round(base.cti_division(((select indicateurs [9] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [10] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100,(select indicateurs [10] as Decembre from w_table where level <>9 and code1 ilike '%12')),0)
|
|
|
|
|
|
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA4]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
15 as rang,
|
|
|
(SELECT libelle[4] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
16 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [14] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [14] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [14] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [14] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [14] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [14] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [14] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [14] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [14] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [14] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [14] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [14] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [14] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
17 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [13] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [13] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [13] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [13] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [13] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [13] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [13] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [13] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [13] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [13] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [13] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [13] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [13] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
18 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [13] as total from w_table where level = 9 ) - (select indicateurs [14] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [13] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [14] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [13] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [14] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [13] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [14] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [13] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [14] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [13] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [14] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [13] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [14] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [13] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [14] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [13] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [14] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [13] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [14] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [13] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [14] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [13] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [14] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [13] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [14] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
19 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [13] as total from w_table where level = 9 ) - (select indicateurs [14] as total from w_table where level = 9 ))*100,(select indicateurs [14] as total from w_table where level = 9 )),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [14] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100,(select indicateurs [14] as Janvier from w_table where level <>9 and code1 ilike '%01')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [14] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100,(select indicateurs [14] as Fevrier from w_table where level <>9 and code1 ilike '%02')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [14] as Mars from w_table where level <>9 and code1 ilike '%03'))*100,(select indicateurs [14] as Mars from w_table where level <>9 and code1 ilike '%03')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [14] as Avril from w_table where level <>9 and code1 ilike '%04'))*100,(select indicateurs [14] as Avril from w_table where level <>9 and code1 ilike '%04')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [14] as Mai from w_table where level <>9 and code1 ilike '%05'))*100,(select indicateurs [14] as Mai from w_table where level <>9 and code1 ilike '%05')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [14] as Juin from w_table where level <>9 and code1 ilike '%06'))*100,(select indicateurs [14] as Juin from w_table where level <>9 and code1 ilike '%06')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [14] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [14] as Juillet from w_table where level <>9 and code1 ilike '%07')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [14] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [14] as Aout from w_table where level <>9 and code1 ilike '%08')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [14] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [14] as Septembre from w_table where level <>9 and code1 ilike '%09')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [14] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100,(select indicateurs [14] as Octobre from w_table where level <>9 and code1 ilike '%10')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [14] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100,(select indicateurs [14] as Novembre from w_table where level <>9 and code1 ilike '%11')),0),
|
|
|
round(base.cti_division(((select indicateurs [13] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [14] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100,(select indicateurs [14] as Decembre from w_table where level <>9 and code1 ilike '%12')),0)
|
|
|
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA5]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
20 as rang,
|
|
|
(SELECT libelle[5] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
21 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [18] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [18] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [18] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [18] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [18] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [18] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [18] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [18] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [18] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [18] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [18] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [18] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [18] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
22 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [17] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [17] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [17] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [17] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [17] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [17] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [17] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [17] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [17] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [17] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [17] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [17] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [17] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
23 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [17] as total from w_table where level = 9 ) - (select indicateurs [18] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [17] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [18] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [17] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [18] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [17] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [18] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [17] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [18] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [17] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [18] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [17] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [18] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [17] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [18] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [17] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [18] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [17] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [18] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [17] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [18] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [17] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [18] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [17] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [18] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
24 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [17] as total from w_table where level = 9 ) - (select indicateurs [18] as total from w_table where level = 9 ))*100,(select indicateurs [18] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Janvier from w_table where level <>9 and code1 ilike '%01')-(select indicateurs [18] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100,(select indicateurs [18] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [18] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100,(select indicateurs [18] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [18] as Mars from w_table where level <>9 and code1 ilike '%03'))*100,(select indicateurs [18] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [18] as Avril from w_table where level <>9 and code1 ilike '%04'))*100,(select indicateurs [18] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [18] as Mai from w_table where level <>9 and code1 ilike '%05'))*100,(select indicateurs [18] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [18] as Juin from w_table where level <>9 and code1 ilike '%06'))*100,(select indicateurs [18] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [18] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [18] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [18] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [18] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [18] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [18] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [18] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100,(select indicateurs [18] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [18] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100,(select indicateurs [18] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [17] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [18] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100,(select indicateurs [18] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA6]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
25 as rang,
|
|
|
(SELECT libelle[6] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
26 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [22] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [22] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [22] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [22] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [22] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [22] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [22] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [22] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [22] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [22] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [22] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [22] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [22] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
27 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [21] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [21] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [21] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [21] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [21] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [21] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [21] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [21] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [21] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [21] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [21] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [21] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [21] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
28 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [21] as total from w_table where level = 9 ) - (select indicateurs [22] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [21] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [22] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [21] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [22] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [21] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [22] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [21] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [22] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [21] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [22] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [21] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [22] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [21] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [22] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [21] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [22] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [21] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [22] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [21] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [22] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [21] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [22] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [21] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [22] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
29 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [21] as total from w_table where level = 9 ) - (select indicateurs [22] as total from w_table where level = 9 ))*100, (select indicateurs [22] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [22] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [22] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [22] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [22] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [22] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [22] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [22] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [22] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [22] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [22] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [22] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [22] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [22] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [22] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [22] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [22] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [22] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [22] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [22] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [22] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [22] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [22] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [21] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [22] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [22] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA7]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
30 as rang,
|
|
|
(SELECT libelle[7] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
31 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [26] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [26] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [26] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [26] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [26] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [26] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [26] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [26] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [26] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [26] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [26] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [26] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [26] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
32 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [25] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [25] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [25] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [25] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [25] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [25] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [25] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [25] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [25] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [25] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [25] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [25] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [25] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
33 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [25] as total from w_table where level = 9 ) - (select indicateurs [26] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [25] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [26] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [25] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [26] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [25] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [26] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [25] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [26] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [25] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [26] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [25] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [26] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [25] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [26] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [25] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [26] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [25] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [26] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [25] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [26] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [25] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [26] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [25] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [26] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
34 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [25] as total from w_table where level = 9 ) - (select indicateurs [26] as total from w_table where level = 9 ))*100, (select indicateurs [26] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [26] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [26] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [26] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [26] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [26] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [26] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [26] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [26] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [26] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [26] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [26] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [26] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [26] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [26] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [26] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [26] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [26] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [26] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [26] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [26] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [26] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [26] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [25] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [26] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [26] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA8]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
35 as rang,
|
|
|
(SELECT libelle[8] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
36 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [30] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [30] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [30] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [30] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [30] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [30] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [30] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [30] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [30] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [30] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [30] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [30] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [30] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
37 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [29] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [29] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [29] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [29] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [29] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [29] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [29] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [29] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [29] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [29] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [29] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [29] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [29] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
38 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [29] as total from w_table where level = 9 ) - (select indicateurs [30] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [29] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [30] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [29] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [30] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [29] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [30] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [29] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [30] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [29] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [30] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [29] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [30] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [29] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [30] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [29] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [30] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [29] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [30] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [29] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [30] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [29] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [30] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [29] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [30] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
39 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [29] as total from w_table where level = 9 ) - (select indicateurs [30] as total from w_table where level = 9 ))*100, (select indicateurs [30] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [30] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [30] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [30] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [30] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [30] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [30] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [30] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [30] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [30] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [30] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [30] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [30] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [30] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [30] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [30] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [30] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [30] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [30] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [30] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [30] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [30] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [30] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [29] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [30] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [30] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA9]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
40 as rang,
|
|
|
(SELECT libelle[9] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
41 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [34] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [34] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [34] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [34] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [34] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [34] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [34] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [34] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [34] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [34] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [34] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [34] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [34] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
42 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [33] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [33] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [33] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [33] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [33] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [33] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [33] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [33] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [33] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [33] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [33] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [33] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [33] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
43 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [33] as total from w_table where level = 9 ) - (select indicateurs [34] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [33] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [34] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [33] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [34] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [33] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [34] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [33] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [34] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [33] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [34] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [33] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [34] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [33] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [34] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [33] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [34] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [33] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [34] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [33] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [34] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [33] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [34] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [33] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [34] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
44 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [33] as total from w_table where level = 9 ) - (select indicateurs [34] as total from w_table where level = 9 ))*100, (select indicateurs [34] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [34] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [34] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [34] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [34] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [34] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [34] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [34] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [34] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [34] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [34] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [34] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [34] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [34] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [34] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [34] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [34] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [34] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [34] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [34] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [34] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [34] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [34] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [33] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [34] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [34] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA10]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
45 as rang,
|
|
|
(SELECT libelle[10] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
46 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [38] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [38] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [38] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [38] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [38] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [38] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [38] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [38] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [38] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [38] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [38] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [38] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [38] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
47 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [37] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [37] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [37] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [37] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [37] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [37] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [37] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [37] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [37] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [37] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [37] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [37] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [37] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
48 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [37] as total from w_table where level = 9 ) - (select indicateurs [38] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [37] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [38] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [37] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [38] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [37] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [38] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [37] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [38] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [37] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [38] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [37] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [38] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [37] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [38] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [37] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [38] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [37] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [38] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [37] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [38] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [37] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [38] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [37] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [38] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
49 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [37] as total from w_table where level = 9 ) - (select indicateurs [38] as total from w_table where level = 9 ))*100, (select indicateurs [38] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [38] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [38] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [38] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [38] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [38] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [38] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [38] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [38] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [38] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [38] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [38] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [38] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [38] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [38] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [38] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [38] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [38] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [38] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [38] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [38] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [38] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [38] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [37] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [38] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [38] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA011]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
50 as rang,
|
|
|
(SELECT libelle[11] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
51 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [42] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [42] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [42] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [42] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [42] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [42] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [42] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [42] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [42] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [42] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [42] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [42] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [42] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
52 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [41] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [41] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [41] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [41] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [41] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [41] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [41] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [41] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [41] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [41] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [41] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [41] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [41] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
53 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [41] as total from w_table where level = 9 ) - (select indicateurs [42] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [41] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [42] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [41] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [42] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [41] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [42] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [41] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [42] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [41] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [42] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [41] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [42] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [41] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [42] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [41] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [42] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [41] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [42] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [41] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [42] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [41] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [42] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [41] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [42] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
54 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [41] as total from w_table where level = 9 ) - (select indicateurs [42] as total from w_table where level = 9 ))*100, (select indicateurs [42] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [42] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [42] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [42] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [42] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [42] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [42] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [42] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [42] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [42] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [42] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [42] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [42] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [42] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [42] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [42] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [42] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [42] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [42] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [42] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [42] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [42] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [42] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [41] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [42] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [42] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA012]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
55 as rang,
|
|
|
(SELECT libelle[12] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
56 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [46] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [46] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [46] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [46] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [46] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [46] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [46] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [46] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [46] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [46] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [46] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [46] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [46] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
57 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [45] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [45] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [45] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [45] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [45] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [45] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [45] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [45] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [45] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [45] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [45] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [45] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [45] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
58 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [45] as total from w_table where level = 9 ) - (select indicateurs [46] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [45] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [46] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [45] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [46] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [45] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [46] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [45] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [46] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [45] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [46] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [45] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [46] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [45] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [46] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [45] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [46] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [45] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [46] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [45] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [46] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [45] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [46] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [45] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [46] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
59 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [45] as total from w_table where level = 9 ) - (select indicateurs [46] as total from w_table where level = 9 ))*100, (select indicateurs [46] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [46] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [46] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [46] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [46] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [46] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [46] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [46] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [46] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [46] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [46] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [46] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [46] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [46] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [46] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [46] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [46] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [46] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [46] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [46] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [46] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [46] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [46] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [45] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [46] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [46] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA013]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
60 as rang,
|
|
|
(SELECT libelle[13] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
61 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [50] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [50] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [50] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [50] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [50] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [50] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [50] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [50] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [50] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [50] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [50] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [50] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [50] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
62 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [49] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [49] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [49] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [49] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [49] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [49] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [49] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [49] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [49] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [49] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [49] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [49] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [49] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
63 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [49] as total from w_table where level = 9 ) - (select indicateurs [50] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [49] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [50] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [49] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [50] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [49] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [50] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [49] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [50] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [49] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [50] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [49] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [50] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [49] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [50] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [49] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [50] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [49] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [50] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [49] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [50] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [49] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [50] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [49] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [50] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
64 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [49] as total from w_table where level = 9 ) - (select indicateurs [50] as total from w_table where level = 9 ))*100, (select indicateurs [50] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [50] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [50] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [50] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [50] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [50] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [50] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [50] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [50] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [50] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [50] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [50] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [50] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [50] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [50] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [50] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [50] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [50] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [50] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [50] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [50] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [50] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [50] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [49] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [50] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [50] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA014]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
65 as rang,
|
|
|
(SELECT libelle[14] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
66 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [54] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [54] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [54] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [54] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [54] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [54] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [54] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [54] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [54] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [54] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [54] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [54] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [54] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
67 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [53] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [53] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [53] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [53] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [53] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [53] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [53] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [53] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [53] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [53] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [53] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [53] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [53] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
68 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [53] as total from w_table where level = 9 ) - (select indicateurs [54] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [53] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [54] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [53] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [54] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [53] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [54] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [53] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [54] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [53] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [54] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [53] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [54] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [53] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [54] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [53] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [54] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [53] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [54] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [53] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [54] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [53] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [54] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [53] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [54] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
69 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [53] as total from w_table where level = 9 ) - (select indicateurs [54] as total from w_table where level = 9 ))*100, (select indicateurs [54] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [54] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [54] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [54] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [54] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [54] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [54] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [54] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [54] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [54] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [54] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [54] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [54] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [54] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [54] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [54] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [54] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [54] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [54] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [54] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [54] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [54] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [54] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [53] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [54] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [54] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
[EVAL
|
|
|
if ('[DATA015]' != '0') {
|
|
|
return "
|
|
|
union
|
|
|
select
|
|
|
70 as rang,
|
|
|
(SELECT libelle[15] FROM w_header),
|
|
|
(select indicateurs [0] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [0] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [0] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [0] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [0] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [0] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [0] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [0] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [0] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [0] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [0] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [0] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [0] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
union
|
|
|
select
|
|
|
71 as rang,
|
|
|
'Année ' || SUBSTR('[VIEW.PERIODE_D]',0,5),
|
|
|
(select indicateurs [58] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [58] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [58] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [58] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [58] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [58] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [58] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [58] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [58] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [58] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [58] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [58] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [58] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
72 as rang,
|
|
|
'Année ' || SUBSTR('[PERIODE]',0,5),
|
|
|
(select indicateurs [57] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [57] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [57] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [57] as Mars from w_table where level <>9 and code1 ilike '%03'),
|
|
|
(select indicateurs [57] as Avril from w_table where level <>9 and code1 ilike '%04'),
|
|
|
(select indicateurs [57] as Mai from w_table where level <>9 and code1 ilike '%05'),
|
|
|
(select indicateurs [57] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [57] as Juillet from w_table where level <>9 and code1 ilike '%07'),
|
|
|
(select indicateurs [57] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [57] as Septembre from w_table where level <>9 and code1 ilike '%09') ,
|
|
|
(select indicateurs [57] as Octobre from w_table where level <>9 and code1 ilike '%10') ,
|
|
|
(select indicateurs [57] as Novembre from w_table where level <>9 and code1 ilike '%11') ,
|
|
|
(select indicateurs [57] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
73 as rang,
|
|
|
'Ecart N-1' ,
|
|
|
(select indicateurs [57] as total from w_table where level = 9 ) - (select indicateurs [58] as total from w_table where level = 9 ),
|
|
|
(select indicateurs [57] as Janvier from w_table where level <>9 and code1 ilike '%01') -(select indicateurs [58] as Janvier from w_table where level <>9 and code1 ilike '%01'),
|
|
|
(select indicateurs [57] as Fevrier from w_table where level <>9 and code1 ilike '%02') -(select indicateurs [58] as Fevrier from w_table where level <>9 and code1 ilike '%02') ,
|
|
|
(select indicateurs [57] as Mars from w_table where level <>9 and code1 ilike '%03') -(select indicateurs [58] as Mars from w_table where level <>9 and code1 ilike '%03') ,
|
|
|
(select indicateurs [57] as Avril from w_table where level <>9 and code1 ilike '%04') -(select indicateurs [58] as Avril from w_table where level <>9 and code1 ilike '%04') ,
|
|
|
(select indicateurs [57] as Mai from w_table where level <>9 and code1 ilike '%05') -(select indicateurs [58] as Mai from w_table where level <>9 and code1 ilike '%05') ,
|
|
|
(select indicateurs [57] as Juin from w_table where level <>9 and code1 ilike '%06') -(select indicateurs [58] as Juin from w_table where level <>9 and code1 ilike '%06') ,
|
|
|
(select indicateurs [57] as Juillet from w_table where level <>9 and code1 ilike '%07') -(select indicateurs [58] as Juillet from w_table where level <>9 and code1 ilike '%07') ,
|
|
|
(select indicateurs [57] as Aout from w_table where level <>9 and code1 ilike '%08') -(select indicateurs [58] as Aout from w_table where level <>9 and code1 ilike '%08') ,
|
|
|
(select indicateurs [57] as Septembre from w_table where level <>9 and code1 ilike '%09')-(select indicateurs [58] as Septembre from w_table where level <>9 and code1 ilike '%09'),
|
|
|
(select indicateurs [57] as Octobre from w_table where level <>9 and code1 ilike '%10') -(select indicateurs [58] as Octobre from w_table where level <>9 and code1 ilike '%10'),
|
|
|
(select indicateurs [57] as Novembre from w_table where level <>9 and code1 ilike '%11') -(select indicateurs [58] as Novembre from w_table where level <>9 and code1 ilike '%11'),
|
|
|
(select indicateurs [57] as Decembre from w_table where level <>9 and code1 ilike '%12') -(select indicateurs [58] as Decembre from w_table where level <>9 and code1 ilike '%12')
|
|
|
|
|
|
union
|
|
|
|
|
|
select
|
|
|
74 as rang,
|
|
|
'% N-1' ,
|
|
|
round(base.cti_division(((select indicateurs [57] as total from w_table where level = 9 ) - (select indicateurs [58] as total from w_table where level = 9 ))*100, (select indicateurs [58] as total from w_table where level = 9 )),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Janvier from w_table where level <>9 and code1 ilike '%01') - (select indicateurs [58] as Janvier from w_table where level <>9 and code1 ilike '%01'))*100, (select indicateurs [58] as Janvier from w_table where level <>9 and code1 ilike '%01')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Fevrier from w_table where level <>9 and code1 ilike '%02') - (select indicateurs [58] as Fevrier from w_table where level <>9 and code1 ilike '%02'))*100, (select indicateurs [58] as Fevrier from w_table where level <>9 and code1 ilike '%02')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Mars from w_table where level <>9 and code1 ilike '%03') - (select indicateurs [58] as Mars from w_table where level <>9 and code1 ilike '%03'))*100, (select indicateurs [58] as Mars from w_table where level <>9 and code1 ilike '%03')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Avril from w_table where level <>9 and code1 ilike '%04') - (select indicateurs [58] as Avril from w_table where level <>9 and code1 ilike '%04'))*100, (select indicateurs [58] as Avril from w_table where level <>9 and code1 ilike '%04')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Mai from w_table where level <>9 and code1 ilike '%05') - (select indicateurs [58] as Mai from w_table where level <>9 and code1 ilike '%05'))*100, (select indicateurs [58] as Mai from w_table where level <>9 and code1 ilike '%05')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Juin from w_table where level <>9 and code1 ilike '%06') - (select indicateurs [58] as Juin from w_table where level <>9 and code1 ilike '%06'))*100, (select indicateurs [58] as Juin from w_table where level <>9 and code1 ilike '%06')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Juillet from w_table where level <>9 and code1 ilike '%07') - (select indicateurs [58] as Juillet from w_table where level <>9 and code1 ilike '%07'))*100, (select indicateurs [58] as Juillet from w_table where level <>9 and code1 ilike '%07')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Aout from w_table where level <>9 and code1 ilike '%08') - (select indicateurs [58] as Aout from w_table where level <>9 and code1 ilike '%08'))*100, (select indicateurs [58] as Aout from w_table where level <>9 and code1 ilike '%08')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Septembre from w_table where level <>9 and code1 ilike '%09') - (select indicateurs [58] as Septembre from w_table where level <>9 and code1 ilike '%09'))*100,(select indicateurs [58] as Septembre from w_table where level <>9 and code1 ilike '%09')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Octobre from w_table where level <>9 and code1 ilike '%10') - (select indicateurs [58] as Octobre from w_table where level <>9 and code1 ilike '%10'))*100, (select indicateurs [58] as Octobre from w_table where level <>9 and code1 ilike '%10')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Novembre from w_table where level <>9 and code1 ilike '%11') - (select indicateurs [58] as Novembre from w_table where level <>9 and code1 ilike '%11'))*100, (select indicateurs [58] as Novembre from w_table where level <>9 and code1 ilike '%11')),1),
|
|
|
round(base.cti_division(((select indicateurs [57] as Decembre from w_table where level <>9 and code1 ilike '%12') - (select indicateurs [58] as Decembre from w_table where level <>9 and code1 ilike '%12'))*100, (select indicateurs [58] as Decembre from w_table where level <>9 and code1 ilike '%12')),1)
|
|
|
";
|
|
|
}
|
|
|
EVAL]
|
|
|
group by 1
|
|
|
order by 1 asc;
|
|
|
|
|
|
select * from w_temp1 ;
|
|
|
]]> </select>
|
|
|
<FIELDS>
|
|
|
<FIELD name="NN"/>
|
|
|
<FIELD name="N"/>
|
|
|
<FIELD name="N0"/>
|
|
|
<FIELD name="N1"/>
|
|
|
<FIELD name="N2"/>
|
|
|
<FIELD name="N3"/>
|
|
|
<FIELD name="N4"/>
|
|
|
<FIELD name="N5"/>
|
|
|
<FIELD name="N6"/>
|
|
|
<FIELD name="N7"/>
|
|
|
<FIELD name="N8"/>
|
|
|
<FIELD name="N9"/>
|
|
|
<FIELD name="N10"/>
|
|
|
<FIELD name="N11"/>
|
|
|
<FIELD name="N12"/>
|
|
|
<FIELD name="N13"/>
|
|
|
<FIELD name="N14"/>
|
|
|
<FIELD name="N15"/>
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</QUERY>
|
|
|
|
|
|
<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
|
|
|
<SQL>
|
|
|
<select><![CDATA[
|
|
|
SELECT 'PERIODE_D' , CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[PERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[PERIODE_D]' END::text
|
|
|
UNION
|
|
|
SELECT 'TOPERIODE_D' , CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[TOPERIODE_D]' END::text
|
|
|
UNION
|
|
|
SELECT 'PERIODE_D_LABEL', CASE WHEN CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[PERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[PERIODE_D]' END = p_calendrier_mois.date_debut THEN p_calendrier_mois.texte ELSE p_calendrier.texte END
|
|
|
FROM base.p_calendrier
|
|
|
JOIN base.p_calendrier_mois ON p_calendrier.mois = p_calendrier_mois.mois
|
|
|
WHERE date = CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[PERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[PERIODE_D]' END
|
|
|
UNION
|
|
|
SELECT 'TOPERIODE_D_LABEL', CASE WHEN CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[TOPERIODE_D]' END = p_calendrier_mois.date_fin THEN p_calendrier_mois.texte ELSE p_calendrier.texte_court END
|
|
|
FROM base.p_calendrier
|
|
|
JOIN base.p_calendrier_mois ON p_calendrier.mois = p_calendrier_mois.mois
|
|
|
WHERE date = CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[TOPERIODE_D]' END
|
|
|
UNION
|
|
|
SELECT 'X_PERIODE_D', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
|
|
|
UNION
|
|
|
SELECT 'X_TOPERIODE_D', greatest(to_date(to_char('[TOPERIODE]'::date - INTERVAL '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
|
|
|
UNION
|
|
|
SELECT 'X_PERIODE', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL '3 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
|
|
|
UNION
|
|
|
SELECT 'BASE_NAT_YEAR', extract('year' FROM max(date_reference))::text FROM pmsi.t_indicateurs_atih where periode_type <> 'NOW'
|
|
|
]]> </select>
|
|
|
<FIELDS>
|
|
|
<FIELD name="name" />
|
|
|
<FIELD name="value" />
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</QUERY>
|
|
|
</QUERIES>
|
|
|
<PRESENTATION>
|
|
|
<VIEWLINKS>
|
|
|
<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="PMSI000037.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
|
|
|
<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
|
|
|
<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
|
|
|
<ARG name="GROUPBY" value="if(SELECT.LGROUPBY != '-1'){return SELECT.LGROUPBY;}else{return SELECT.GROUPBY;}"/>
|
|
|
<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
|
|
|
<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Comparatif mensuel" shortLabel="Comp. Mensuel" view="PMSI000437.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
|
|
|
<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
|
|
|
<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
|
|
|
<ARG name="GROUPBY" value="if(SELECT.LGROUPBY != '-1'){return SELECT.LGROUPBY;}else{return SELECT.GROUPBY;}"/>
|
|
|
<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
|
|
|
<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Evolution comparative" shortLabel="Evol. comparative" view="PMSI000438.XML" rowContext="false" componentName="" enabled="true" buttonType="VIEWLINK_EVO_COMP_1">
|
|
|
<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
|
|
|
<ARG name="GROUPBY" value="if(SELECT.LGROUPBY != '-1'){return SELECT.LGROUPBY;}else{return SELECT.GROUPBY;}"/>
|
|
|
<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
|
|
|
<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
|
|
|
<ARG name="GROUPBY_2" value="MSOR" />
|
|
|
<ARG name="GROUPBY_TAB" value="return 'TAB';" />
|
|
|
<ARG name="TYPE_COMPARAISON" value="'2'" />
|
|
|
<ARG name="LGROUPBY" value="return SELECT.GROUPBY;"/>
|
|
|
<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;"/>
|
|
|
<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;"/>
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Evolution" shortLabel="Evolution" view="PMSI000036.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
|
|
|
<ARG name="DATA" value="'1.1'" />
|
|
|
<ARG name="GROUPBY" value="if(SELECT.LGROUPBY != '-1'){return SELECT.LGROUPBY;}else{return SELECT.GROUPBY;}"/>
|
|
|
<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
|
|
|
<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="PMSI000213.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
|
|
|
<ARG name="ALIAS_PERIODE" value="'-1'" />
|
|
|
<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
|
|
|
<ARG name="DATA" value="'1.1'" />
|
|
|
<ARG name="COLUMNBY" value="'MSOR'" />
|
|
|
<ARG name="GROUPBY" value="'ASOR'" />
|
|
|
<ARG name="GROUPBY_2" value="if (SELECT.GROUPBY == 'ASOR') {return 'GHM';} else {return SELECT.LGROUPBY;}" />
|
|
|
<ARG name="GROUPBY_TAB" value="'TAB'" />
|
|
|
<ARG name="COLUMNBYCOUNT" value="'12'" />
|
|
|
<ARG name="LGROUPBY" value="return SELECT.GROUPBY;"/>
|
|
|
<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;"/>
|
|
|
<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;"/>
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Analyse" shortLabel="Analyse" rowContext="false" buttonType="VIEWLINK_ANALYSE_MCO">
|
|
|
<VIEWITEM label="Analyse" shortLabel="Analyse" view="PMSI000007.XML" enabled="true" rowContext="false" buttonType="ANALYSE">
|
|
|
<ARG name="PERIODE" value="return VIEW.PERIODE;" />
|
|
|
<ARG name="TOPERIODE" value="return VIEW.TOPERIODE;" />
|
|
|
<ARG name="GROUPBY_TAB" value="'AUTO'" />
|
|
|
<ARG name="GROUPBY" value="if(SELECT.LGROUPBY != '-1'){return SELECT.LGROUPBY;}else{return SELECT.GROUPBY;}"/>
|
|
|
<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
|
|
|
<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
|
|
|
</VIEWITEM>
|
|
|
<VIEWITEM label="Analyse paramétrable" shortLabel="Analyse CA" view="PMSI000439.XML" enabled="true" rowContext="false" buttonType="ANALYSE">
|
|
|
<ARG name="PERIODE" value="return VIEW.PERIODE;" />
|
|
|
<ARG name="TOPERIODE" value="return VIEW.TOPERIODE;" />
|
|
|
<ARG name="GROUPBY_TAB" value="'AUTO'" />
|
|
|
<ARG name="GROUPBY" value="if(SELECT.LGROUPBY != '-1'){return SELECT.LGROUPBY;}else{return SELECT.GROUPBY;}"/>
|
|
|
<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
|
|
|
<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
|
|
|
<ARG name="LS_DATA" value="'-1'" />
|
|
|
<ARG name="DATA01" value="SELECT.DATA1" />
|
|
|
<ARG name="DATA02" value="SELECT.DATA2" />
|
|
|
<ARG name="DATA03" value="SELECT.DATA3" />
|
|
|
<ARG name="DATA04" value="SELECT.DATA4" />
|
|
|
<ARG name="DATA05" value="SELECT.DATA5" />
|
|
|
<ARG name="DATA06" value="SELECT.DATA6" />
|
|
|
<ARG name="DATA07" value="SELECT.DATA7" />
|
|
|
<ARG name="DATA08" value="SELECT.DATA8" />
|
|
|
<ARG name="DATA09" value="SELECT.DATA9" />
|
|
|
<ARG name="DATA010" value="SELECT.DATA010" />
|
|
|
<ARG name="DATA011" value="SELECT.DATA011" />
|
|
|
<ARG name="DATA012" value="SELECT.DATA012" />
|
|
|
<ARG name="DATA013" value="SELECT.DATA013" />
|
|
|
<ARG name="DATA014" value="SELECT.DATA014" />
|
|
|
<ARG name="DATA015" value="SELECT.DATA015" />
|
|
|
</VIEWITEM>
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Justificatif des RSS" shortLabel="Justificatif RSS" rowContext="false" buttonType="BUTTON_MCO_ZOOM">
|
|
|
<VIEWITEM label="Liste des RSS" shortLabel="Liste RSS" view="PMSI000038.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_2_VIEWLINK" />
|
|
|
<VIEWITEM label="Liste EXH par RSS" shortLabel="Liste EXH" view="PMSI000010.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_2_VIEWLINK">
|
|
|
<ARG name="DATA" value="'1'" />
|
|
|
</VIEWITEM>
|
|
|
<VIEWITEM label="Liste EXB par RSS" shortLabel="Liste EXB" view="PMSI000010.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_2_VIEWLINK">
|
|
|
<ARG name="DATA" value="'2'" />
|
|
|
</VIEWITEM>
|
|
|
</VIEWLINK>
|
|
|
</VIEWLINKS>
|
|
|
<ONGLET excelLabel="Répartition mensuelle" label="Synthèse" multiTab="true" queryNumber="1">
|
|
|
|
|
|
<CHART title="" type="group" subType="h" percentHeight="100" fromTotal="false">
|
|
|
<CHART title="Evolution comparative" type="lineChart" serieIsCategory="true" fromTotal="false" maxItems="2" maxItemsSortOn="" sortField="" sortSeq="" condition="ROW.NN == 1 || ROW.NN == 2">
|
|
|
<CATEGORY field="N" type="Char" displayName="return SELECT.DATA15" displayNameCalc="true" />
|
|
|
<SERIE field="N1" displayName="'Janvier'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|1',0)) !='-1'" />
|
|
|
<SERIE field="N2" displayName="'Fevrier'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|2',0)) !='-1'" />
|
|
|
<SERIE field="N3" displayName="'Mars'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|3',0)) !='-1'" />
|
|
|
<SERIE field="N4" displayName="'Avril'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|4',0)) !='-1'" />
|
|
|
<SERIE field="N5" displayName="'Mai'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|5',0)) !='-1'" />
|
|
|
<SERIE field="N6" displayName="'Juin'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|6',0)) !='-1'" />
|
|
|
<SERIE field="N7" displayName="'Juillet'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|7',0)) !='-1'" />
|
|
|
<SERIE field="N8" displayName="'Aout'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|8',0)) !='-1'" />
|
|
|
<SERIE field="N9" displayName="'Septembre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|9',0)) !='-1'" />
|
|
|
<SERIE field="N10" displayName="'Octobre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|10',0)) !='-1'" />
|
|
|
<SERIE field="N11" displayName="'Novembre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|11',0)) !='-1'" />
|
|
|
<SERIE field="N12" displayName="'Décembre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|12',0)) !='-1'" />
|
|
|
</CHART>
|
|
|
</CHART>
|
|
|
<DATAGRID title="" total="true" showOthers="true" headerHeight="36" variableRowHeight="true" sortable="false" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'">
|
|
|
<INSERT name="DATAGRID_MULTITAB_STYLES"/>
|
|
|
<ROWSTYLE name="fontSize" value="12"/>
|
|
|
<ROWSTYLE name="fontSize" value="13" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="backgroundColor" value="0xCCCCCC" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="fontWeight" value="bold" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="color" value="0xC0392B" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="paddingLeft" value="20" condition=" ROW.NN % 5 != '0'"/>
|
|
|
<COLUMN dataField="N" minWidth="150" type="char" fixed="false" headerText="libelle" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NN" visible="false" />
|
|
|
<COLUMN dataField="N0" width="120" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Total" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N1" width="120" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Janvier" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|1',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N2" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Février" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|2',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N3" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Mars" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|3',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N4" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Avril" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|4',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N5" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Mai" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|5',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N6" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Juin" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|6',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N7" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Juillet" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|7',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N8" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Aout" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|8',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N9" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Septembre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|9',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N10" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Octobre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|10',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N11" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Novembre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|11',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N12" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Décembre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|12',0)) !='-1'" textAlign="right" otherFunction="sum" totalFunction="sum">
|
|
|
</COLUMN>
|
|
|
</DATAGRID>
|
|
|
</ONGLET>
|
|
|
<ONGLET excelLabel="Répartition mensuelle" label="Arborescence" multiTab="true">
|
|
|
<CHART title="" type="group" subType="h" percentHeight="100" fromTotal="false">
|
|
|
<CHART title="Décomposition (10 premiers)" type="pieChart" maxItems="10" maxItemsSortOn="N0" maxItemsSortSeq="D" sortField="N0" sortSeq="D" condition="ROW.LVL == '1'">
|
|
|
<CATEGORY field="N" type="Char" />
|
|
|
<SERIE field="N0" displayName="SELECT.DATA15" displayNameCalc="true" />
|
|
|
</CHART>
|
|
|
<CHART title="Evolution comparative" type="lineChart" serieIsCategory="true" fromTotal="false" maxItems="2" maxItemsSortOn="" sortField="" sortSeq="" condition="ROW.NN == 1 || ROW.NN == 2">
|
|
|
<CATEGORY field="N" type="Char" displayName="return SELECT.DATA15" displayNameCalc="true" />
|
|
|
<SERIE field="N2" displayName="'Janvier'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|1',0)) !='-1'" />
|
|
|
<SERIE field="N3" displayName="'Fevrier'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|2',0)) !='-1'" />
|
|
|
<SERIE field="N4" displayName="'Mars'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|3',0)) !='-1'" />
|
|
|
<SERIE field="N5" displayName="'Avril'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|4',0)) !='-1'" />
|
|
|
<SERIE field="N6" displayName="'Mai'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|5',0)) !='-1'" />
|
|
|
<SERIE field="N7" displayName="'Juin'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|6',0)) !='-1'" />
|
|
|
<SERIE field="N8" displayName="'Juillet'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|7',0)) !='-1'" />
|
|
|
<SERIE field="N9" displayName="'Aout'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|8',0)) !='-1'" />
|
|
|
<SERIE field="N10" displayName="'Septembre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|9',0)) !='-1'" />
|
|
|
<SERIE field="N11" displayName="'Octobre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|10',0)) !='-1'" />
|
|
|
<SERIE field="N12" displayName="'Novembre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|11',0)) !='-1'" />
|
|
|
<SERIE field="N13" displayName="'Décembre'" displayNameCalc="true" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|12',0)) !='-1'" />
|
|
|
</CHART>
|
|
|
</CHART>
|
|
|
<DATAGRID title="" total="true" showOthers="true" headerHeight="36" sortable="false" variableRowHeight="true">
|
|
|
<INSERT name="DATAGRID_MULTITAB_STYLES"/>
|
|
|
<ROWSTYLE name="fontSize" value="12"/>
|
|
|
<ROWSTYLE name="fontSize" value="13" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="backgroundColor" value="0xCCCCCC" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="fontWeight" value="bold" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="color" value="0xC0392B" condition=" ROW.NN % 5 == '0'"/>
|
|
|
<ROWSTYLE name="paddingLeft" value="20" condition=" ROW.NN % 5 != '0'"/>
|
|
|
<COLUMN dataField="N" minWidth="150" type="char" fixed="false" headerText="libelle">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NN" visible="false" />
|
|
|
<COLUMN dataField="LVL" visible="false" />
|
|
|
<COLUMN dataField="N1" width="120" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Total" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N2" width="120" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Janvier" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|1',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N3" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Février" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|2',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N4" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Mars" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|3',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N5" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Avril" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|4',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N6" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Mai" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|5',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N7" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Juin" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|6',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N8" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Juillet" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|7',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N9" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Aout" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|8',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N10" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Septembre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|9',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N11" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Octobre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|10',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N12" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Novembre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|11',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="N13" width="100" type="Number" outputFormat="=
|
|
|
if(ROW.NN == 4 || ROW.NN == 9 || ROW.NN % 10 == 4 || ROW.NN % 10 == 9) {return '#%';}
|
|
|
else if(ROW.NN == 1 || ROW.NN == 2 || ROW.NN == 3){return SELECT.DATA12;}
|
|
|
else if(ROW.NN == 6 || ROW.NN == 7 || ROW.NN == 8){return SELECT.DATA22;}
|
|
|
else if(ROW.NN == 11 || ROW.NN == 12 || ROW.NN == 13){return SELECT.DATA32;}
|
|
|
else if(ROW.NN == 16 || ROW.NN == 17 || ROW.NN == 18){return SELECT.DATA42;}
|
|
|
else if(ROW.NN == 21 || ROW.NN == 22 || ROW.NN == 23){return SELECT.DATA52;}
|
|
|
else if(ROW.NN == 26 || ROW.NN == 27 || ROW.NN == 28){return SELECT.DATA62;}
|
|
|
else if(ROW.NN == 31 || ROW.NN == 32 || ROW.NN == 33){return SELECT.DATA72;}
|
|
|
else if(ROW.NN == 36 || ROW.NN == 37 || ROW.NN == 38){return SELECT.DATA82;}
|
|
|
else if(ROW.NN == 41 || ROW.NN == 42 || ROW.NN == 43){return SELECT.DATA92;}
|
|
|
else if(ROW.NN == 46 || ROW.NN == 47 || ROW.NN == 48){return SELECT.DATA102;}
|
|
|
else if(ROW.NN == 51 || ROW.NN == 52 || ROW.NN == 53){return SELECT.DATA0112;}
|
|
|
else if(ROW.NN == 56 || ROW.NN == 57 || ROW.NN == 58){return SELECT.DATA0122;}
|
|
|
else if(ROW.NN == 61 || ROW.NN == 62 || ROW.NN == 63){return SELECT.DATA0132;}
|
|
|
else if(ROW.NN == 66 || ROW.NN == 67 || ROW.NN == 68){return SELECT.DATA0142;}
|
|
|
else if(ROW.NN == 71 || ROW.NN == 72 || ROW.NN == 73){return SELECT.DATA0152;}
|
|
|
" fixed="false" headerText="Décembre" visibleCondition="('[VIEW.NB_MOIS]'.indexOf('|12',0)) !='-1'" textAlign="right">
|
|
|
</COLUMN>
|
|
|
</DATAGRID>
|
|
|
</ONGLET>
|
|
|
</PRESENTATION>
|
|
|
</VUE>
|