GROUP BY and SUM problem - More

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Feb 26 11:23:10 CST 2003


on 2/26/03 2:17 AM, Gunnar Swan at GunnarSwan at practicetopass.com wrote:

> 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 ????

Yes. Sounds like it broken.

I have test yesterday LONG type of field.
So you can use LONG instead of FLOAT.

> 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 ;-)

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list