Re: SOUNDEX CODE

From: Jomarlen <jomarlen_at_aol.com>
Date: 1997/10/15
Message-ID: <19971015235201.TAA24781_at_ladder02.news.aol.com>#1/1


>Hai,
>
>I want to confirm about the number of bytes returned
>by the ORACLE Soundex function.Is it always four byte
>long for any name? How many Soundex codes are available...
>Please give hints on using the ORACLE soundex function..
>
>Thanks in advance
>
>Bye,
>Deepak

From SQL Language on-line help

 SOUNDEX  Syntax SOUNDEX(char)

Purpose Returns a character string containing the phonetic  representation of char. This function allows you to compare words that are  spelled differently, but sound alike in English.

The phonetic representation is defined in The Art of Computer Programming,  Volume 3: Sorting and Searching, by Donald E. Knuth, as follows:

· retain the first letter of the string and remove the following letters: a,  e, h, i, o, w, y

· assign the numbers to the remaining letters as follows:

0 = a, e, h, i, o, w, y
1 = b, f, p, v
2 = c, e, g, j, k, q, s, x, z
3 = d, t = 3
4 = l
5 = m, n
r = 6


· if two or more of the numbers are in sequences, remove all but the first

· return the first four bytes padded with 0

Example	SELECT ename
		FROM emp
		WHERE SOUNDEX(ename)

  • SOUNDEX('SMYTHE')
ENAME

SMITH Copyright (c) 1994, Oracle Corporation. Received on Wed Oct 15 1997 - 00:00:00 CEST

Original text of this message