thanks for the hlep guys..
for those that are curious, the distinct is tehr cause it's
someone elses code that i'm workig on .. :) have to kick
out the bug's//
jeff
On Tue, 30 May 2000, Matthias Urlichs wrote:
> Hi,
>
> Jeff MacDonald:
> > gid is unique.. it's a serial..
> >
> Then there is
Hi Jeff!
I think you need a solution, and not explains...
Tom, and the others told the truth. You missed this query.
> gid is unique.. it's a serial..
I give you two ways:
1) gid __realy__ unique -> DISTINCT is unnecessary.
SELECT gid FROM members -- ... etc
2) gid not unique -> DISTINCT
Jeff MacDonald <[EMAIL PROTECTED]> writes:
> gid is unique.. it's a serial..
Mph. If you assume that gid is unique then the query would give
well-defined results, but if you know it's unique then why don't
you just leave off the DISTINCT?
> funny thing is tho this worked on 6.5
No, 6.5 merely
Hi,
Jeff MacDonald:
> gid is unique.. it's a serial..
>
Then there is no point in using "DISTINCT" in the first place, is there?
> funny thing is tho this worked on 6.5
It happened to work because your gid is unique. But in the general case,
it can't work. Consider this table:
gid created
X
]>
>Reply-To: Jeff MacDonald <[EMAIL PROTECTED]>
>To: Patrick FICHE <[EMAIL PROTECTED]>
>CC: Jeff MacDonald <[EMAIL PROTECTED]>, Pgsql-Sql <[EMAIL PROTECTED]>
>Subject: RE: [SQL] 7.0 weirdness
>Date: Tue, 30 May 2000 10:46:30 -0300 (ADT)
>
>gid is unique..
&
gt;From: Jeff MacDonald <[EMAIL PROTECTED]>
> >Reply-To: Jeff MacDonald <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> >Subject: [SQL] 7.0 weirdness
> >Date: Tue, 30 May 2000 09:28:11 -0300 (ADT)
> >
> >hi folks,
> >
> &g
part
> de Jeff MacDonald
> Envoyé : mardi 30 mai 2000 14:28
> À : [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Objet : [SQL] 7.0 weirdness
>
>
> hi folks,
>
> this query works fine in 6.5 but screwie in 7.0
>
> 7.0
>
> gm=> SELECT DISTINCT gid FROM mem
would need to change the table structure to a better
normal form.
Regards ,
Omid Omoomi
>From: Jeff MacDonald <[EMAIL PROTECTED]>
>Reply-To: Jeff MacDonald <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: [SQL] 7.0 weirdness
>Date: Tue, 30 May 2000 0
ch order is Postgres supposed to give the data???
Patrick Fiche
-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part
de Jeff MacDonald
Envoyé : mardi 30 mai 2000 14:28
À : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : [SQL] 7.0 weirdness
hi folks,
this qu
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 wantrstypemal
10 matches
Mail list logo