Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server GESTEP function


 
Updated: 27 August 2010

Use GESTEP to test whether a number is greater than or equal to a threshold value.
Syntax
SELECT [wctEngineering].[wct].[GESTEP] (
   <@Number, float,>
 ,<@Step_value, float,>)
Arguments
@Number
is the value to test against the step. @Number is an expression of type float or of a type that can be implicitly converted to float
@Step_value
is the threshold value. @Step_value is an expression of type float or of a type that can be implicitly converted to float
Return Types
float
Remarks
·         If @Number@Step_value then GESTEP returns a one (1), otherwise GESTEP returns a zero (0)
·         If @Step_value is null, GESTEP assumes zero (0).
Examples

select
wct.GESTEP(5,4)

This produces the following result
----------------------
1
 
(1 row(s) affected)


select
wct.GESTEP(5,5) 

This produces the following result
----------------------
1
 
(1 row(s) affected)



select
wct.GESTEP(-4,-5) 

This produces the following result
----------------------
1
 
(1 row(s) affected)


select
wct.GESTEP(-1,0) 

This produces the following result
----------------------
0
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service