Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D59619FB8BF for ; Fri, 23 Feb 2007 15:00:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 39069-06 for ; Fri, 23 Feb 2007 14:59:57 -0400 (AST) X-Greylist: delayed 00:34:26.248502 by SQLgrey-1.7.4 Received: from 208091.vserver.de (nirs.de [62.75.208.91]) by postgresql.org (Postfix) with ESMTP id 2F4E69FB574 for ; Fri, 23 Feb 2007 14:59:57 -0400 (AST) Received: from becker.local (p54AD3871.dip0.t-ipconnect.de [84.173.56.113]) (authenticated bits=0) by 208091.vserver.de (8.12.8/8.12.8) with ESMTP id l1NIPTKM020170 for ; Fri, 23 Feb 2007 19:25:29 +0100 From: Stefan Becker To: pgsql-sql@postgresql.org Subject: how do I to generate a sequence Range or Set of integer constants Date: Fri, 23 Feb 2007 19:25:35 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200702231925.35411.pgsql@yukonho.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.136 tagged_above=0 required=5 tests=BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200702/237 X-Sequence-Number: 27571 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