Logo

SQL Server ODD Function

Updated 2023-10-13 20:37:50.330000

Description

Use the scalar function ODD to calculate a number rounded up to the nearest odd integer.

Syntax

SELECT [westclintech].[wct].[ODD] (
   <@Number, float,>)

Arguments

@Number

is the value to round. @Number is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

The term rounding up always means rounding away from zero

Examples

SELECT wct.ODD(-1.1);

Here is the result set.

column 1
-3