derived_stat  exp

Chapter 2: Transact-SQL Functions

difference

Description

Returns the difference between two soundex values.

Syntax

difference(expr1,expr2)

Parameters

expr1

is a character-type column name, variable, or constant expression of char, varchar, nchar, nvarchar, or unichar type.

expr2

is another character-type column name, variable, or constant expression of char, varchar, nchar, nvarchar, or unichar type.

Examples

Example 1

select difference("smithers", "smothers")
---------
4

Example 2

select difference("smothers", "brothers")
---------
2

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute difference.

See also

Function soundex





Copyright © 2005. Sybase Inc. All rights reserved. exp

View this book as PDF