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 |
|
andreoli
Starting Member
1 Post |
Posted - 2002-08-02 : 23:05:42
|
| I have a table with 2 fields with 90000 records.Part_no : Character - UniqueManuf_pn: Character - non unique BUT 99.5 percent are unique values anyway.There are a few hundred Manuf_pn's that are similar in value.How do I create a select statement that would return only those values that are similar in value?Thanks,Antonio |
|
|
r937
Posting Yak Master
112 Posts |
Posted - 2002-08-02 : 23:33:54
|
| if "similar" means equal, this will return only those values that are in the table more than once, along with a count of how many timesselect Manuf_pn, count(*) from yourtablegroup by Manuf_pnhaving count(*) > 1rudyhttp://rudy.ca/ |
 |
|
|
|
|
|