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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Returning Duplicate Records only Once.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-05 : 09:13:10
Chris writes "I have a table with a field named CustomerName. I need to return all data from this field, but only wish to view dupicate records once. How do I accomplish this in SQL.

Example:

CustomerName includes:
A1 Lumber
Bernie Pools
Bernie Pools
Smithtown Ford

I want the result:
A1 Lumber
Bernie Pool
Smithtown Ford"

LarsG
Constraint Violating Yak Guru

284 Posts

Posted - 2002-02-05 : 09:34:52
select distinct customername from theTableContainingCustomerName

Go to Top of Page
   

- Advertisement -