COMBIN
Updated 2023-10-13 19:49:34.287000
Syntax
SELECT [westclintech].[wct].[COMBIN] (
<@Number, float,>
,<@Number_chosen, float,>)
Description
Use the scalar function COMBIN to calculate the combinatorial for a given number of items.
Arguments
@Number_chosen
the number of items in each combination. @Number_chosen is an expression of type float or of a type that can be implicitly converted to float.
@Number
the number of items. @Number is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
@Number and @Number_chosen are truncated to integers.
@Number and @Number_chosen must be greater than zero.
COMBIN can be thought of as FACT(@Number) / (FACT(@Number - @Number_chosen) * FACT(@Number_chosen)).
Examples
SELECT wct.COMBIN(52, 5);
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"2598960"}]}