Click or drag to resize
sqx

SQXUTable Method

Function [table] UTable([int] N, [int] Seed)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
public static IEnumerator UTable(
	SqlInt32 N,
	SqlInt32 Seed
)

Parameters

N
Type: System.Data.SqlTypesSqlInt32
[int]
Seed
Type: System.Data.SqlTypesSqlInt32
[int]

Return Value

Type: IEnumerator
[table]
Remarks
Generate table with Random Uniform(0,1) Distributed values.

NOTE: Use NULL in Seed for Non deterministic.

Attributes

IsDeterministic = false, IsPrecise = true, DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, TableDefinition = "ID int, Value float"
Examples
SQL
-- Non deterministic
SELECT * FROM sqx.UTable(1000, NULL)
SQL
-- RAND BETWEEN DISCRETE (int)
SELECT ID, sqx.UniformD_PPF(Value, 1, 10) Value FROM sqx.UTable(10,2)
SQL
-- RAND BETWEEN CONTINUOUS (float)
SELECT ID, sqx.UniformC_PPF(Value, 1, 10) Value FROM sqx.UTable(10,2)
See Also