Re: Select row cells as new columns

Поиск
Список
Период
Сортировка
От Jan Lentfer
Тема Re: Select row cells as new columns
Дата
Msg-id 862d618c8d42e3a0b300d1f7be966d77@neslonek.homeunix.org
обсуждение исходный текст
Ответ на Select row cells as new columns  (danycxxx <danycxxx@yahoo.com>)
Ответы Re: Select row cells as new columns  (danycxxx <danycxxx@yahoo.com>)
Список pgsql-sql
On Fri, 25 May 2012 02:03:41 -0700 (PDT), danycxxx wrote:
[...]
> The question:
> How can I achive this output?
>
> nume, prenume, cnp, nume anterior, stare civila, ... (as columns - 
> built
> from unique rows from infos)
> a      , a, .......
> b      , b, ....... (as rows)

Did you look at crosstab functions?
http://www.postgresql.org/docs/9.1/static/tablefunc.html


Jan
-- 
professional: http://www.oscar-consult.de
private: http://neslonek.homeunix.org/drupal/


В списке pgsql-sql по дате отправления:

Предыдущее
От: danycxxx
Дата:
Сообщение: Select row cells as new columns
Следующее
От: Jan Lentfer
Дата:
Сообщение: Re: Job control in sql