Received: from rage.hub.org (root@nat196.87.mpoweredpc.net [142.177.196.87]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA31638; Tue, 30 May 2000 10:10:28 -0400 (EDT) (envelope-from jeff@pgsql.com) Received: from localhost (bignose@localhost) by rage.hub.org (8.9.3/8.9.3) with ESMTP id LAA70104; Tue, 30 May 2000 11:10:24 -0300 (ADT) (envelope-from jeff@pgsql.com) X-Authentication-Warning: rage.hub.org: bignose owned process doing -bs Date: Tue, 30 May 2000 11:10:24 -0300 (ADT) From: Jeff MacDonald X-Sender: bignose@rage.hub.org Reply-To: Jeff MacDonald To: omid omoomi cc: jeff@pgsql.com, pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: 7.0 weirdness In-Reply-To: <20000530134645.34684.qmail@hotmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200005/196 gid is unique.. it's a serial.. funny thing is tho this worked on 6.5 oh well thanks for the info. jeff On Tue, 30 May 2000, omid omoomi wrote: > Hi jeff, > I'm not sure but may be that's because you are using select distinct and so > there would be a few rows with same "gid" but different "created" fields in > your table . And PG does not know which one to select and compare for ORDER > BY clause. If that ,you would need to change the table structure to a better > normal form. > Regards , > Omid Omoomi > > > >From: Jeff MacDonald > >Reply-To: Jeff MacDonald > >To: pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org > >Subject: [SQL] 7.0 weirdness > >Date: Tue, 30 May 2000 09:28:11 -0300 (ADT) > > > >hi folks, > > > >this query works fine in 6.5 but screwie in 7.0 > > > >7.0 > > > >gm=> SELECT DISTINCT gid FROM members > >gm-> WHERE active = 't' > >gm-> AND (gender = 0 > >gm-> AND (wantrstypemale LIKE '%Short Term%' > >gm-> OR wantrstypemale like '%Marriage%' > >gm-> OR wantrstypemale like '%Long Term%' > >gm-> OR wantrstypemale like '%Penpal%' > >gm-> OR wantrstypemale like '%Activity Partner%') > >gm-> ) order by created desc; > >ERROR: For SELECT DISTINCT, ORDER BY expressions must appear in target > >list > >gm=> > > > > > >any idea's ? > > > >jeff > > > > > > > > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com >