Re: dynamic crosstab

Поиск
Список
Период
Сортировка
От Balázs Klein
Тема Re: dynamic crosstab
Дата
Msg-id 20080215164012.390B0ACB77@mail00a.mail.t-online.hu
обсуждение исходный текст
Ответ на Re: dynamic crosstab  (Erik Jones <erik@myemma.com>)
Список pgsql-general

> -----Original Message-----
> > Do youthink there is a way to ensure that the order of the values in the
> > array below is the same for each person?
> >
> > tbl(eID, aID, value)
> >
> > Select eID, array_accum(value) from
> > (
> >  (Select Distinct eID from tbl) e
> >   CROSS JOIN
> >  (Select Distinct aID from tbl) a
> > ) ea
> >  LEFT OUTER JOIN
> > tbl USING (eID, aID)
> > GROUP BY eID
>
> The only way to ever guarantee a particular order is via an ORDER BY
> clause.

Sure. I just didn’t know where to put it - most aggregates don't care about the row order, but for this one it is
important.


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

Предыдущее
От: paul rivers
Дата:
Сообщение: Re: Pains in upgrading to 8.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Pains in upgrading to 8.3