Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminate records duplication other than using DISTINCT and GROUP BY

  • Thread starter Thread starter -
  • Start date Start date
Status
Not open for further replies.

Guest
Hi,
I have a table like this

Cus_no Add_type Addr1 Addr2 Addr3 Zipcode

with primary keys being Cus_no and Add_type. There are thousand of customer records. And there are more than one record (address) for each customer. Now, I intend to extract only one record (address) per customer whichever come first using SQL. I have tried using SELECT statement with DISTINCT and GROUP BY but both doesn't eliminate the records duplication. Somebody please advice me. Thanks in advance.
 
hi,

I am not able to understand the question. Please send me the details. I need the table structure and constraints information. my mail id is biosraman@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top