From: | Igor Roboul <igor(at)raduga(dot)dyndns(dot)org> |
---|---|
To: | PGSQL-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SQL question - problem with INTERSECT |
Date: | 2000-11-01 04:58:04 |
Message-ID: | 20001101075804.A10542@linux.rainbow |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Oct 30, 2000 at 07:59:06PM -0500, Keith L. Musser wrote:
> "(SELECT messages.msgid FROM messages, subject_index WHERE
> ((subject_index.word='Hello' or subject_index.word='There') and
> (subject_index.msgid = messages.msgid))
> GROUP BY messages.msgid HAVING count(messages.msgid)=2)
> INTERSECT
> (SELECT messages.msgid FROM messages, author_index WHERE
> ((author_index.word='Jim' or author_index.word='Jones') and
> (author_index.msgid = messages.msgid))
> GROUP BY messages.msgid HAVING count(messages.msgid)=2);"
Try removing first "GROUP BY messages.msgid HAVING count(messages.msgid)=2)"
--
Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga",
Sochi, Russia
http://www.brainbench.com/transcript.jsp?pid=304744
From | Date | Subject | |
---|---|---|---|
Next Message | Yann Ramin | 2000-11-01 05:05:05 | Case insensitive LIKE queries |
Previous Message | KuroiNeko | 2000-11-01 04:41:05 | Re: Query caching |