From: | "Tim Joyce" <tim(at)hoop(dot)co(dot)uk> |
---|---|
To: | "PGSQL" <pgsql-general(at)postgreSQL(dot)org> |
Subject: | select distinct |
Date: | 2000-02-01 07:44:05 |
Message-ID: | 009701bf6c8b$95b6c3a0$0501a8c0@noonoo |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I am running this query and expecting distinct results
ebmh=> SELECT DISTINCT articles.id FROM articles, paragraphs WHERE
paragraphs.ar
ticle_key = articles.id and paragraphs.paragraph ~* 'dementia' ORDER BY
articles
.page_no;
id
--
4
4
4
4
16
12
12
12
12
12
3
3
3
(13 rows)
however, if i remove the ORDER BY, it works
ebmh=> SELECT DISTINCT articles.id FROM articles, paragraphs WHERE
paragraphs.ar
ticle_key = articles.id and paragraphs.paragraph ~* 'dementia';
id
--
3
4
12
16
(4 rows)
this is in 6.4 and 6.5.2, am i doing something wrong?
Cheers
Tim Joyce
Chief Enthusiast
tim(at)hoop(dot)co(dot)uk
HOOP Ltd
http://www.hoop.co.uk
01202 251 816
HOOP is proud to be a member of the Paneris community (www.paneris.co.uk)
From | Date | Subject | |
---|---|---|---|
Next Message | Borek.Lupomesky | 2000-02-01 08:57:50 | Time of last UPDATE or INSERT |
Previous Message | mathprof | 2000-02-01 03:48:19 | Linking in sin() as a C function |