MySQL Forums
Forum List  »  Newbie

Re: Avoid couples in the resultset
Posted by: Felix Geerinckx
Date: August 18, 2005 06:50AM

Schindler Judith wrote:

> select t1.id_topics, i1.id_indices , t2.id_topics
> from indices i1, indices i2, topics t1, topics t2
> where (i1.ind ='test' and i1.id_urls=t1.id_urls
> and i2.id_urls=t2.id_urls and i1.ind=i2.ind and
> t1.id_topics<>t2.id_topics)
>
> I would like to eliminate the "inverted" mates of couples in the resultset.

Replace <> in the last line of your query with <

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: Avoid couples in the resultset
August 18, 2005 06:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.