select distinct
От | Tim Joyce |
---|---|
Тема | select distinct |
Дата | |
Msg-id | 009701bf6c8b$95b6c3a0$0501a8c0@noonoo обсуждение исходный текст |
Ответ на | Re: [GENERAL] SQL Book (<kaiq@realtyideas.com>) |
Ответы |
RE: [GENERAL] select distinct
|
Список | 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@hoop.co.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)
В списке pgsql-general по дате отправления: