GROUP BY and SUM problem - More

Gunnar Swan GunnarSwan at PracticeToPass.com
Tue Feb 25 16:17:54 CST 2003


Found the problem. Same issue with 1.9.6 and 1.9.7

The Valentina data fields are declared as "UShort".
In Director ... fields store text. Therefore, I cast to integer with ...

Valentina.SetField("SomeField") = member("SomeField").text.integer

The .integer function returns an integer and I use an integer in the UShort of Valentina.
The data stores, and no valentina error.

But ... With GROUP BY and SUM ... I get VOID.

FIX ...

I changed the Valentina field to FLOAT.

Then, instead of type casting to integer, I type cast in Director to float ...

Valentina.SetField("SomeField") = member("SomeField").text.float

Now ... the GROUP BY and SUM work.

Question ... 
Should Valentina GROUP BY and SUM, where the Valentina field is UShort, and data inserted is cast as integer ????
My test show it does not ... a VOID is returned. My test show that GROUP BY and SUM work with float, not integer and UShort.

I am going with the float, but this was an interesting little detour ;-) 

Gunnar





More information about the Valentina mailing list