D
Dawn
Table x has only one field “minusâ€, whose value from (-∞,+∞).
Query as below:
Select count(x.minus>0) as field1,
Sum(iif(x.minus>0,minus,0)) as field2
From x;
But after running, the result of field2 is correct, while field1 is the
total records number of table x, not what I wanted.
As One of the MVP recommended in a similar problem, he used function: “absâ€,
Query:
Select abs(x.minus>0) as field1,
Sum(iif(x.minus>0,minus,0)) as field2
From x;
When running , it occurs run-time error.
What I want is to calculate the sum of minus which is over zero, and the
respective records number.
Thanks.
Dawn
Query as below:
Select count(x.minus>0) as field1,
Sum(iif(x.minus>0,minus,0)) as field2
From x;
But after running, the result of field2 is correct, while field1 is the
total records number of table x, not what I wanted.
As One of the MVP recommended in a similar problem, he used function: “absâ€,
Query:
Select abs(x.minus>0) as field1,
Sum(iif(x.minus>0,minus,0)) as field2
From x;
When running , it occurs run-time error.
What I want is to calculate the sum of minus which is over zero, and the
respective records number.
Thanks.
Dawn