Pages

Sep 15, 2008

Searching a column name using Sounds in SQL SERVER 2005

SQL SERVER 2005 Even adds a Advanced search option like Searching using Sounds.
For eg:
We can search using the sounds of the word say, Column name having the sounds like rich..using the SOUNDEX Function May contain
Name:
Rex

Rich
Relay
Ross
Raj

The Query looks like

SELECT COLUMN_NAME FORM [dbo].[TABLE_NAMEWHERE]
WHERE SOUNDEX(COLUMN_NAME) = SOUNDEX('Rich')

This will return the column values which sound like rich.. We cant do this using 'like' Operator

No comments: