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 |
|
icw
Constraint Violating Yak Guru
378 Posts |
Posted - 2007-12-14 : 04:27:37
|
| Hi AllIs there a soundex function or 'looks-like' or something similar to the soundex function in Crystal reports.This would be really useful for my client if they want to find any records with a similar name on the database. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-14 : 04:30:16
|
| Yes. SQL Server provides two functions - SOUNDEX() and DIFFERENCE() for phonetic comparison.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
icw
Constraint Violating Yak Guru
378 Posts |
Posted - 2007-12-14 : 06:26:46
|
| thanks a lot for your reply.Don't suppose you could tell me when you would use either one. |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-14 : 06:29:11
|
As per SQL Server help: quote: The SOUNDEX function converts a character string to a four-digit code for use in a comparison. Vowels are ignored in the comparison. Nonalphabetic characters are used to terminate the comparison.The DIFFERENCE function compares the SOUNDEX values of two strings and evaluates the similarity between them, returning a value from 0 through 4, where 4 is the best match.
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-12-14 : 06:31:21
|
| select soundex('sql'),soundex('sequel')MadhivananFailing to plan is Planning to fail |
 |
|
|
icw
Constraint Violating Yak Guru
378 Posts |
Posted - 2007-12-14 : 06:42:56
|
| cheers |
 |
|
|
|
|
|