Click or drag to resize
sqx

NULLS Structure

Aggregate [bigint] NULLS([sql_variant] Value)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
[SerializableAttribute]
public struct NULLS
Remarks
NULLS count aggregate function.
Support: All Nullable user defined types and SQL data types.

Attributes

Format.Native, IsInvariantToDuplicates = false, IsInvariantToNulls = false, IsInvariantToOrder = true, IsNullIfEmpty = true
Examples
SQL
DECLARE @Test TABLE (
ID int NOT NULL IDENTITY PRIMARY KEY,
V1 int NULL
)
INSERT @Test (V1)
SELECT Value FROM sqx.NTable(1,9)
INSERT @Test (V1)
VALUES (NULL)

SELECT sqx.SafeDiv(sqx.NULLS(V1), COUNT(*)) [PercentNulls]
FROM @Test
/*
PercentNulls
----------------------
0.1*/
See Also