Re: Breakdown results by month

Поиск
Список
Период
Сортировка
От Jeff Boes
Тема Re: Breakdown results by month
Дата
Msg-id 42F21B44.1030505@endpoint.com
обсуждение исходный текст
Ответ на Breakdown results by month  (Henry Ortega <juandelacruz@gmail.com>)
Список pgsql-sql
Henry Ortega wrote:
> I have the ff table:
> 
> id       |    total    |     effective        |    end_date
> john          6              01-01-2005        02-28-2005
> john          8              03-01-2005        06-30-2005
> 
> How can I return:
> id       |    total    |     effective        |    end_date
> john          6              01-01-2005        01-31-2005
> john          6              02-01-2005        02-28-2005
> john          8              03-01-2005        03-31-2005
> john          8              04-01-2005        04-30-2005
> john          8              05-01-2005        05-31-2005
> john          8              06-01-2005        06-30-2005

I would look at writing a PL/PgSQL function that walks through the rows,
generating substitute rows for the dates you want.



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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: NEW and OLD as ROWS
Следующее
От: Louise Catherine
Дата:
Сообщение: Make C file for create type