how do I to generate a sequence Range or Set of integer constants

Поиск
Список
Период
Сортировка
От Stefan Becker
Тема how do I to generate a sequence Range or Set of integer constants
Дата
Msg-id 200702231925.35411.pgsql@yukonho.de
обсуждение исходный текст
Ответы Re: how do I to generate a sequence Range or Set of integer constants  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: how do I to generate a sequence Range or Set of integer constants  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: how do I to generate a sequence Range or Set of integer constants  (Joe <dev@freedomcircle.net>)
Список pgsql-sql
dear SQL friends,

What I want to do might be done differantly.  Right now I can't
think of another solution other than a select statement

I would like to create a sequence range of integer constants.  Join
this sequence against a ID Range in a database and look for missing
Id's.   

Another application for this would be to simply populate a database with
say 1000..9999 Records....

Now:  Is there a syntax that allows for the following.....

create table XX (id int);
insert into XX (select  xx from "1 to 1000" of integers)

or...

select IntSeq.MissingValues, x.UniqIntId,x.A,x.B,x.C, 
from MyDataTable x
left outer join 
(select  MissingValues from "1 to 1000" of integers
) IntSeq on MissingValues=x.UniqIntId


I'm hoping that someone has done this and might be able to
point to some function or methode to do this

Thanks,

Stefan Becker
-- 
email: stefan@yukonho.de
tel  : +49 (0)6232-497631
http://www.yukonho.de


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: simple web search
Следующее
От: Sumeet
Дата:
Сообщение: selecting random row values in postgres