SOUNDEX()
All functions > STRING > SOUNDEX()
Returns a four-character Soundex code representing the phonetic sound of a string.
Signatures
Returns: Four-character Soundex code representing the phonetic sound
SOUNDEX(string: VARCHAR) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
string | VARCHAR | Yes | String to convert to Soundex code |
Notes
- Used for fuzzy string matching based on pronunciation
- Words that sound similar have the same Soundex code
- Result is always a letter followed by three digits
- Useful for matching names despite spelling variations
Examples
FeatureQL
SELECT
-- Common surname
f1 := SOUNDEX('Smith'),
-- Similar sound to Smith
f2 := SOUNDEX('Smythe'),
-- Another surname
f3 := SOUNDEX('Johnson'),
-- Similar to Johnson
f4 := SOUNDEX('Jonson'),
-- Different pattern
f5 := SOUNDEX('Williams'),
-- First name example
f6 := SOUNDEX('Robert')
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR | f5 VARCHAR | f6 VARCHAR |
|---|---|---|---|---|---|
| S530 | S530 | J525 | J525 | W452 | R163 |
On this page