(Original) How to totally DataTable data

xiaoxiao2021-03-06  42

We may not want to take a total of some fields through the SQL statement to complete this function (the data structure is the same as the data "compute method.

http://blog.9cbs.net/lovecherry/archive/2005/02/25/301441.aspx

For example, add a label1, making this Label's average age of people who are greater than 20 years old can be written

This.Label1.Text = DS.TABLES ["Table1"]. Compute ("AVG (IAGE)", "IAGE> 20"). TOSTRING (); Compute () method The first parameter is a polymeric function (such as SUM, " AVG and the like) The second parameter is the condition of the code is basically equal to SELECT AVG (IAGE) from TB1 WHERE IAGE> 20

转载请注明原文地址:https://www.9cbs.com/read-53622.html

New Post(0)