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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-13 : 08:50:05
|
| Bill writes "I have a table and when I do a simple "Select * From TableA" it gives me back 112345667778How can I make it only give me back the records thate repeat like this.1166777Bill Chapin" |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-03-13 : 09:11:57
|
| select * from tablenamewhere id in (select id from tablename group by idhaving count(*)>1)HTH-------------------------------------------------------------- |
 |
|
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-03-13 : 09:13:44
|
| Try the following:SELECT * FROM AGROUP BY columna HAVING COUNT(columna) > 1Jeremy |
 |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-03-13 : 09:18:25
|
| Bill if you have more columns other then id you can use the query i have written ,otherwise Jeremy's is fine.-------------------------------------------------------------- |
 |
|
|
|
|
|