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
 Transact-SQL (2000)
 Count Function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-02-21 : 07:49:23
John writes "How can I select all names from a table which exist twice or three times and so on, in one select statement (uses a inner join too)?

Thanks"

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-02-21 : 07:58:20
[code]SELECT [Name]
FROM ...
GROUP BY [Name]
HAVING COUNT(*) > 1[/code]

Mark
Go to Top of Page
   

- Advertisement -