MySQL Forums
Forum List  »  InnoDB

finding duplicates across 2 columns....
Posted by: Thomas Lynch
Date: July 11, 2008 04:27PM

Hi y'all,

I'm running into a problem and my brain isn't working or coming up with a solution. I have a table that is storing a "friends" list, but it's storing it backwards in my mind. I'm migrating to a new platform and uses the friends in a much better style but now I have 2 of each friend on each user's friend list.

The old db is storing profile_to and profile_from both int's.

I have the following in the db.

to from

5 10
10 5
12 5
5 12

and so on, for about 10,000 profiles. I have tried every query I know to pull back only 1 of the above, but it's just not working. How can I query for the duplicates across the to & from fields without knowing the individual profile id...

Thanks for the help!

Options: ReplyQuote


Subject
Views
Written By
Posted
finding duplicates across 2 columns....
2948
July 11, 2008 04:27PM


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.