Iterations in a SELECT

Поиск
Список
Период
Сортировка
От Scott Muir
Тема Iterations in a SELECT
Дата
Msg-id NCBBKLMCJOGCLFHOFECNEECFDPAA.wsmuir@islandnet.com
обсуждение исходный текст
Ответы RE: Iterations in a SELECT  ("Robby Slaughter" <webmaster@robbyslaughter.com>)
RE: Iterations in a SELECT  ("tamsin" <tg_mail@bryncadfan.co.uk>)
Список pgsql-novice
I have a small problem which I'm looking for an elegant solution to...

I'm trying to put together a select where a list dates is compared to a
period to identify dates which aren't in the list...

I could just create a list of days in a table (like 20 years worth) and then
compare it, but I'm wondering if there is a trick where one could get
results like this

select (for i := 1 to 5) as number;

or

select i as number from for(i,1,5);

and get something like

number
------
1
2
3
4
5

Any suggestions?
Thanks
Scott.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: sequence primary key
Следующее
От: "Robby Slaughter"
Дата:
Сообщение: RE: Iterations in a SELECT