Search Postgresql Archives

Multiple Results with crosstab function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 our database 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? by now 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux