Count
Returns a count of the rows based on that are not null or nothing based on the expression
Syntax :
Count(Expression,[Condition])
Parameters | Description |
---|---|
Expression | Column or Formula that is to be counted. Nulls and Nothings will not be counted |
[Condition] | [OPTIONAL] - Calculation to determine if row should be included or not |
Examples :
Table Name : Products
ProductID | Product Name | Price |
---|---|---|
1 | Pen | 6 |
2 | Pencil | 3 |
3 | Eraser | 2 |
4 | Bottle | 5 |
5 | Book | 10 |
6 | Pencil | 3 |
Example 1
dCount = Count(ProductID)
DEBUG(dCount)
Result :
dCount
= 6
Example 2
dCount = Count(ProductID,ProductID >1)
DEBUG(dCount)
Result :
dCount
= 5