Logo

SQL Server DELTA Function

Updated 2023-11-08 20:40:40.610000

Description

Use the scalar function DELTA to test whether two values are equal.

Syntax

SELECT [westclintech].[wct].[DELTA] (
  <@Number1, float,>
 ,<@Number2, float,>)

Arguments

@Number1

is the first number. @Number1 is an expression of type float or of a type that can be implicitly converted to float.

@Number2

is the second number. @Number2 is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

If @Number1 <> @Number2 then DELTA returns a one (1), otherwise DELTA returns a zero (0).

Examples

select wct.DELTA(5, 4);

This produces the following result.

column 1
0
select wct.DELTA(wct.IMABS('5+12i'), 13);

This produces the following result.

column 1
1