[V4RB] sum is not working?

Carsten Friehe rblists at online.de
Sun May 13 07:27:37 CDT 2007


Hi!

I am using V4RB 2.5.6 because that is the last working version for me. But
there is one thing that drives me crazy. It seems that sum() is not working
correctly.

I have a table with one boolean field. I am trying to get a sum() of this
field.
I tried:
select sum(boolfield) from table
and:
select sum(if(boolfield = True, 1, 0)) from table

But I always get 0 as a result. I would expect that he gives me the count
of records where this value is 1 (or true). I know that I simly call:
select count(boolfield) where boolfield 0 true from table
but I also want to get back some other values in parallel. This is only a
part of my select.

Best Regards,
Carsten


More information about the Valentina mailing list