Eliminate records duplication other than using DISTINCT and GROUP BY
Eliminate records duplication other than using DISTINCT and GROUP BY
(OP)
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.
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.





RE: Eliminate records duplication other than using DISTINCT and GROUP BY
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