Soundex Functions in SQL Server 2008

In this article I am going to explain how to get soundex value of a string.
  • 3246

Introduction

It is an algorithm that generates a simple code for a string. It converts a phrase to a four- character code based upon the way in which the word will be pronounced. The first character is the first letter of the phrase. Vowels are omitted till the first letter of the phrase is a vowel and other three letters represent the remaining phrase.

Syntax

select soundex (character_expression'')

where character_expression specifies the string whose soundex value to be returned.

Example

Suppose we have a table named "Employee" given in following image.

CreateTable-in-sqlserver.jpg

Select Soundex value for F_Name if Employee Table

Soundex-function-in-sql.jpg

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.