DStDev, DStDevP Functions (SQL Only)

See AlsovbfctDStDevSee                 ExamplevbfctDStDevEx>Low

Description

Return estimates of the standard deviation for a population and a population sample represented as a set of values in a specified set of records (domainCQNETL).

Syntax

DStDev( expr, domain [, criteria] )

DStDevP( expr, domain [, criteria] )

Remarks

DStDevP evaluates a population, and DStDev evaluates a population sample.

The DStDev and DStDevP functions use the following arguments.

Argument        Description

 

expr                 String expression1330R89 identifying the field that contains the numeric data you want to evaluate, or an expression that performs calculations using the data in that field.  Operands in expr can include the name of a table field, or a Visual Basic function (which can be intrinsic but not a user-defined function or one of the other domain aggregate or SQL aggregate functions).

domain             String expression identifying the records that constitute the domain.  It can be a table name, a query name, or an SQL statement29F05E5 that returns data.

criteria              Optional string expression used to restrict the range of data on which DStDev is performed.  For example, criteria could be the WHERE clause in an SQL expression (without the word WHERE).  If criteria is omitted, DStDev evaluates expr against the entire domain.

 

If the criteria argument contains non-numeric text other than field names, you must enclose the text in single quotation marks.  In the following example from an Orders table, Ship Country is the name of a field, and UK is a string literal.

X = DStDev("[Freight]", "Orders", "[Ship Country] = 'UK'")

Y = DStDevP("[Freight]", "Orders", "[Ship Country] = 'UK'")

Z = DStDevP("[Freight]", "Orders", "[Ship Via] = 1")

 

If domain refers to fewer than two records, or if fewer than two records satisfy criteria, DStDev and DStDevP return a Null (which indicates that a standard deviation can't be calculated).