Rows to columns query

Поиск
Список
Период
Сортировка
От mike
Тема Rows to columns query
Дата
Msg-id 1084206588.8158.9.camel@datacontrol
обсуждение исходный текст
Ответы Re: Rows to columns query  (Kris Jurka <books@ejurka.com>)
Список pgsql-general
Does anyone know if this is feasable

I have two tables

one has inv_id,amount,date, cheque no

the second has
inv_id, amount , code (this relate to type of expenditure)

There is a one to many relationship on inv_id

What I want to do is

Group all the fields in the first table (easy), but then have the
grouped values in the 2nd table appearing as values in the columns ie

inv_id, cheque, amount_vote1,amount_vote2,amount_vote3 etc

Is this doable/feasable (preferably in a view)

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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: basic question (shared buffers vs. effective cache
Следующее
От: "Campano, Troy"
Дата:
Сообщение: ideal postgresql install