Commit ecc96666c9771ce2fcc99bc9c6a6ec7a603bd6e9
1 parent
555fe14c
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
ferramentas/saiku/esquemaxml.php
... | ... | @@ -636,6 +636,7 @@ function dimensoesTabelas(){ |
636 | 636 | $incluirChaves[] = "'1'::numeric as contagem".$mdd["id_medida_variavel"]; |
637 | 637 | } |
638 | 638 | if($mdd["colunavalor"] == "" && $mdd["filtro"] != ""){ |
639 | + $mdd["filtro"] = str_replace('"',"'",$mdd["filtro"]); | |
639 | 640 | $incluirChaves[] = "CASE WHEN {$mdd["filtro"]} THEN 1 ELSE 0 END as contagem".$mdd["id_medida_variavel"]; |
640 | 641 | } |
641 | 642 | } |
... | ... | @@ -648,8 +649,6 @@ function dimensoesTabelas(){ |
648 | 649 | //$incluirChaves[] = $o."::text as ".$o."_"; |
649 | 650 | } |
650 | 651 | } |
651 | - | |
652 | - | |
653 | 652 | $r = $chavesRegiao[$c["codigo_tipo_regiao"]]; |
654 | 653 | $sql = " |
655 | 654 | select ".implode(",",$incluirChaves).", tabelamedida{$c["id_medida_variavel"]}.{$c["colunaidgeo"]}::text as codigoreg |
... | ... | @@ -657,7 +656,6 @@ function dimensoesTabelas(){ |
657 | 656 | if(count($dimRegioes[$c["codigo_tipo_regiao"]]["colunas"]) > 0){ |
658 | 657 | $sql .= ",".implode(",",$dimRegioes[$c["codigo_tipo_regiao"]]["colunas"]); |
659 | 658 | //$sql .= ",tabela{$r["codigo_tipo_regiao"]}.".implode(",tabela{$r["codigo_tipo_regiao"]}.",$dimRegioes[$c["codigo_tipo_regiao"]]["colunas"]); |
660 | - | |
661 | 659 | } |
662 | 660 | |
663 | 661 | $sql .= " |
... | ... | @@ -668,7 +666,7 @@ function dimensoesTabelas(){ |
668 | 666 | $sql .= $dimRegioes[$c["codigo_tipo_regiao"]]["juncoes"]; |
669 | 667 | $f = array(); |
670 | 668 | foreach($tb as $mdd){ |
671 | - if($medida["filtro"] != ""){ | |
669 | + if($mdd["filtro"] != ""){ | |
672 | 670 | $f[] = str_replace('"',"'",$mdd["filtro"]); |
673 | 671 | } |
674 | 672 | } | ... | ... |