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)
 Select on Similar Values

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-06 : 09:37:48
Antonio writes "Hi, I have a table with 90,000 records with these fields: Part_no, Vend_part, Qty. Part_no is unique. Vend_part is not but 99.9 percent are unique values anyway. BUT Vend_part may have a few that are the exact same value (alpha numeric). How do I do a select to return these similar values only. - Thanks"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-08-06 : 10:54:56
Well, are they similar or exact?

To find the exact matches . . .

select vend_part, count(*) as thecount
from Antonio
group by vend_part
having count(*) > 1

 
To find the similar matches . . . you'll have to define what qualifies as 'similar'....

Jay White
{0}
Go to Top of Page

r937
Posting Yak Master

112 Posts

Posted - 2002-08-06 : 20:55:33
duplicate from friday --
http://sqlteam.com/Forums/topic.asp?TOPIC_ID=18446

i guess he musta missed it...

rudy
Go to Top of Page
   

- Advertisement -