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)
 Comparing strings within one table

Author  Topic 

blue_stardusts
Starting Member

1 Post

Posted - 2007-03-21 : 04:03:24
Hi I hope you can help me I am having a bit of a problem ...I need to check this certain table for duplicate values...the thing is, it could just be slightly different and not entirely a duplicate..so I would have to check a column ,example: name and check if it has duplicates or slightly different spelling...how can I do the comparison per row? is it possible to use fetch? and won't that affect the performance?

Thanks
:)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-21 : 04:19:36
Soundex or Levenstein can help you with this.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-21 : 04:21:44
Difference() can come handy for such situation.

SELECT DIFFERENCE('White','Whyte')
GO


Return value >0 and closer to 4 indicates how closely both words match. (4 = identical)

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -