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 |
ldrenning
Starting Member
23 Posts |
Posted - 2006-08-28 : 09:31:28
|
I have a list of several thousand records and I am looking to find only the records where the site_id is listed more than once in the table. Here is what the table looks like.TABLE 1ID (key)SITE_IDNAMEACCOUNTTHANKS! |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-28 : 09:58:34
|
Select Site_Id from yourTablegroup by Site_Id having count(*)>1MadhivananFailing to plan is Planning to fail |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-28 : 09:58:46
|
select site_id from table group by site_id having count(*) > 1Peter LarssonHelsingborg, Sweden |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-28 : 09:59:17
|
Ouch! Shoot the yak icon will be here soon... Peter LarssonHelsingborg, Sweden |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-08-28 : 10:16:23
|
like this [SNIPED] just lower case For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-28 : 11:54:12
|
quote: Originally posted by Peso Ouch! Shoot the yak icon will be here soon... Peter LarssonHelsingborg, Sweden
Often you forget that MadhivananFailing to plan is Planning to fail |
|
|
ldrenning
Starting Member
23 Posts |
Posted - 2006-08-28 : 14:27:16
|
sorry :-( |
|
|
|
|
|