XLeratorDB/statistics Documentation
Updated: 30 May 2017
Use the SQL Server scalar function FACTORIALPOWER to calculate the step-h factorial power x(n,h).
Syntax
SELECT [wct].[FACTORIALPOWER] (
<@x, int,>
,<@n, int,>
,<@h, int,>)
Arguments
Input Name | Definition |
@x | Number of interest |
@n | Number of steps |
@h | Step-size |
Return Type
Remarks
- If @h > 0 then the falling factorial is returned.
- If @h < 0 then the rising factorial is returned.
- If @x, @h, or @n is NULL, then an error is returned.
- Available in XLeratorDB / statistics 2008 only
Examples
Example #1
SELECT
n.h,
wct.FACTORIALPOWER(25,8,n.h) as FactorialPower
FROM
(VALUES (-3),(-2),(-1),(0),(1),(2),(3))n(h)
This produces the following result.
See Also