Received: from tidal.ipinc.com (tidal.ipinc.com [199.245.188.85]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0VHnTq57880 for ; Wed, 31 Jan 2001 12:49:29 -0500 (EST) (envelope-from jliang@tidal.ipinc.com) Received: from localhost (jliang@localhost) by tidal.ipinc.com (8.9.3/8.9.3) with ESMTP id JAA38097; Wed, 31 Jan 2001 09:48:20 -0800 (PST) (envelope-from jliang@tidal.ipinc.com) Date: Wed, 31 Jan 2001 09:48:20 -0800 (PST) From: Jie Liang To: Antti Linno cc: pgsql-sql@postgresql.org Subject: Re: interval query. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200101/487 X-Sequence-Number: 1163 Hi, where id=9999 or id between 3 and 12; or where id in (3,4,5,6,7,8,9,10,11,12,9999); Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 jliang@ipinc.com www.ipinc.com On Wed, 31 Jan 2001, Antti Linno wrote: > Good morning. > > Is there some way to make interval query? > > Towns table(estonia towns, heh :P) > > id | name > > 1 Elva > 2 Tartu > 9999 Tallinn > 3 Tallinn/Haabersti > 4 Tallinn/Mustamae > ... > etc. > > What I need is when the town's id=9999 I want to make query > where id=9999 OR id=[3..12] for example. I could generate bunch of OR's > like id=3 OR id=4 ... but is there some more elegant solution? > > > Greetings, > Antti > >