FLOOR
Updated 2023-06-15 21:35:55.257000
Syntax
SELECT [westclintech].[wct].[FLOOR] (
<@Number, float,>
,<@Significance, float,>)
Description
Use the scalar function FLOOR to calculate a number rounded down, towards zero, to the nearest multiple of significance. For example, it you are dealing with a currency for which there are no fractional units, the formula FLOOR(100.9, 1) would return 100.
Arguments
@Significance
is the multiple to which you want to round. @Significance is an expression of type float or of a type that can be implicitly converted to float.
@Number
is the value to be round down, towards zero. @ Number is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
The sign of @Number and @Significance must be the same
The term rounding down always means rounding towards zero
Examples
SELECT wct.FLOOR(100.9, 1);
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"100"}]}