Sum(1)

  • Thread starter Thread starter mlstone
  • Start date Start date
M

mlstone

I have a field that is created in a query by the expression: 1Count:Sum(1).
I can not figure out what it is counting. What exactly does the 'Sum(1)'
function count?
 
Well, my first guess is that someone created a table column,
or query field and named it with the number 1.

If so, this should work better ...

1Count:Sum([1])

If not, then this expression is virtually a constant, equal to one.
 
It sums 1 for every row. It is virtually the same as Count(*).

Both expressions will return 15, if there are 15 records in the group.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Back
Top