Re: Numbering rows

Поиск
Список
Период
Сортировка
От Mark Morgan Lloyd
Тема Re: Numbering rows
Дата
Msg-id gd5j62$7cv$1@pye-srv-01.telemetry.co.uk
обсуждение исходный текст
Ответ на Numbering rows  (Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>)
Список pgsql-general
Thanks everybody- I'm watching with a lot of interest. I was worried
that I was asking something stupid with an obvious answer...

ries van Twisk wrote:
> May be this function can help :
>
> http://www.postgresql.org/docs/8.3/static/functions-srf.html

Thanks, that's already turning out to be useful for something else I was
working on today:

select percent,
to_char(nedcar_tonnes_001(percent), '99990.99') AS nedcar
from generate_series(0,110,10) as percent;

The one thing I'd say about generate_series() is that the description
suggests that one has to put an explicit count() as the second parameter
if using it to number rows, i.e. it doesn't have an "as many as
necessary" option.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: No select permission on a table but can query it
Следующее
От: "D. Dante Lorenso"
Дата:
Сообщение: Re: Numbering rows