Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Retrieving Duplicate Record based on 2 fields

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-12-16 : 07:04:50
Bong writes "Suppose I have the a table w/ the ff: records on it:

Field1 Field2
1 2
2 1
3 4
4 3
5 6

I want to get rid of recs.#2 and #4. I consider them duplicate
records since values for rec#1 and#3 were repeated though they
were swapped in different fields. There should only be single occurence of a value in any of the two fiels. SO my resulting cursor should be:

Field1 Field2
1 2
3 4
5 6

I want to know how this could be done using SQL. Your immediate
reply is very much appreciated."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-16 : 07:03:26
Guess this homework was due yesterday...
Go to Top of Page
   

- Advertisement -