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 |
|
pwebley
Starting Member
6 Posts |
Posted - 2012-02-02 : 15:03:30
|
| In Excel I am very familiar with the concept of eliminating duplicates in a single column. Now that I am learning SQL I would like to know the quickest way to code a command that would eliminate only single entries and keep duplicate values in a single field. Is this possible? Any help would be appreciated. |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2012-02-02 : 15:06:29
|
| Look up count, group by and having.Your query will look something like this:Select column, count(1)From tableGroup by columnHaving count(1) > 1Duane. |
 |
|
|
pwebley
Starting Member
6 Posts |
Posted - 2012-02-02 : 16:31:18
|
| Thank you! |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-02-02 : 21:25:44
|
are you looking for retrieving records with out duplicate value oryou do not want duplicate value to store in the table ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|