Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
使用compute发现帮助里面有两种情况,条件有一种带方括号,另一种不带。
有什么区别?
示例二
计算产品PD01的销售数量:
Dim Total As Long
Total = DataTables("订单").Compute("Sum(数量)", "产品 = 'PD01'")
Output.Show(Total)
示例三
计算每个客户的订购数量:
Dim Customers As List(Of String)
Dim Total As Integer
Customers = DataTables("订单").GetUniqueValues("", "客户")
For Each Customer As String In Customers
Total = DataTables("订单").Compute("Sum(数量)", "[客户] = '" & Customer & "'")
Output.Show(Customer & ":" & Total)
Next