Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFPSoundex() IN T-SQL ?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00986870
Message ID:
00986881
Vues:
33
You've to understand that SOUNDEX() uses only begining of the string to create code it returns and it stops as soon as 4 character code is generated. That's why the first and the third of your examples return the same value. You can read more about SOUNDEX() algorithm at http://www.ibphoenix.com/main.nfs?a=ibphoenix&s=1107836753:810920&page=ibp_howto4.
It seems that T-SQL doesn't ignore spaces or special characters as VFP does and stops processing as soon as it encounters one. You'll have to remove them yourself to get the same result as in VFP. For example,
SELECT Soundex(REPLACE('John Smith Green', SPACE(1), SPACE(0)))
>in T-SQL the function for
>
>Soundex('John Smith')
>Soundex('John')
>Soundex('John Smith Green')
>
>all return the same value (?)
>
>In VFP the first 2 examples return different values for each one.
>
>It seems that T-SQL take only the first word of a string
>it is correct ?
>How can I do to T-SQL take whole string to compare ?
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform