Soundex and Defference functions use

Source: Internet
Author: User
Tags sybase

Function

Returns a number that represents the sound of a string.

Grammar

SOUNDEX ( string-expression )

Parameters

The string-expression string.

Usage

The value of the SOUNDEX function of a string is based on the first letter and the next three consonants except H, Y, and W. Two repeating letters are counted as one letter. For example

SOUNDEX (' apples ')

Based on the letters A, P, L, and S.

The SOUNDEX function ignores multibyte characters.

Although not perfect, SOUNDEX usually returns the same number for words that sound similar and begin with the same letter.

The SOUNDEX function works best for English words. For other languages, it is of little use.

Standards and compatibility
    • sql/92 supplier extension.

    • sql/99 supplier extension.

    • Sybase is compatible with Adaptive Server Enterprise, but Adaptive server Enterprise returns a CHAR (4) result, and Adaptive server Anywhere return Returns an integer.

Example

The following statement returns two numbers that represent the sound of each name. The SOUNDEX value for each parameter is 3827.

SELECT SOUNDEX (' Smith '), SOUNDEX (' Smythe ')

difference function [string] Function

Returns the difference between the SOUNDEX values of two string expressions.

Grammar

difference ( string-expression-1, string-expression-2 )

Parameters

string-expression-1 the first SOUNDEX parameter.

string-expression-2 a second SOUNDEX parameter.

Standards and compatibility
    • sql/92 supplier extension.

    • sql/99 supplier extension.

    • Sybase is compatible with Adaptive Server Enterprise.

See Also
    • SOUNDEX function [string]
Example

The following statement returns the value 3.

SELECT difference (' Test ', ' chest ')

Soundex and Defference functions use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.