Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project










FUNCTION: STDEV

SELECT STD(field) AS [expression]
FROM table
[WHERE ...]
[GROUPBY ...]
[HAVING ...]

 
The STDEV function is one of the aggregate functions that are used to calculate statistical information for a specified numeric field in a query. The other aggregate functions are: AVG, COUNT, MAX, MIN, STDEVP, SUM, VAR, VARP. Note that all of these functions return a single value.
 
The STDEV function finds the standard deviation by using a portion, called a sample, of the total number of values in a field. This is a time saver when dealing with extremely large tables and can be shown to be statistically valid. In comparison, the STDEVP function uses all of the values to calculate the standard deviation. There must be at least two values in the field or the standard deviation will not be calculated and a NULL is returned.
 
This code finds the standard deviation of the age of the MediCare patients in a hospital (by using a sample) and stores that information in SDAge.
 
SELECT STDEV(Age) AS [SDAge]
FROM MediCarePatients


 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information