Received: from hotmail.com (law-f288.hotmail.com [209.185.130.227]) by hub.org (8.9.3/8.9.3) with SMTP id JAA78706 for ; Tue, 30 May 2000 09:47:16 -0400 (EDT) (envelope-from oomoomi@hotmail.com) Received: (qmail 34685 invoked by uid 0); 30 May 2000 13:46:45 -0000 Message-ID: <20000530134645.34684.qmail@hotmail.com> Received: from 195.200.226.110 by www.hotmail.com with HTTP; Tue, 30 May 2000 06:46:45 PDT X-Originating-IP: [195.200.226.110] From: "omid omoomi" To: jeff@pgsql.com, pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: 7.0 weirdness Date: Tue, 30 May 2000 06:46:45 PDT Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Archive-Number: 200005/194 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