Обсуждение: Multiple Results with crosstab function

Поиск
Список
Период
Сортировка

Multiple Results with crosstab function

От
"Sven Haag"
Дата:
Hi postgres fans,

i'm already using the crosstab function but it shows up an issue with multiple results in the same category. example
table:

 row_name    cat    value
----------+-------+-------
  row1      cat1    val1
  row1      cat1    val2
  row1      cat3    val3
  row1      cat4    val4
  row2      cat1    val5
  row2      cat2    val6
  row2      cat2    val7
  row2      cat4    val8

the crosstab function (as far as i know) usually assumes that only 1 value belongs to 1 category. but unfortunatelly in
ourdatabase it is possible that 1 category has 2 or more values. 

is there a way to tell the crosstab function that it should show 2 rows when there is more then 1 value per category?
bynow only the first value of the selection criteria is shown. 

thanks in advance for every hint.
sven

ps: http://stackoverflow.com/questions/5622981/multiple-results-with-postgresql-crosstab-function

--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de