GROUP BY Cursors

Gunnar Swan GunnarSwan at PracticeToPass.com
Mon Mar 17 17:54:11 CST 2003


Hello,

During development, we have been using a number of different data types. Boolean, String, Text, Long, ULong, UShort and FLOAT.

The application itself is done, and has been. Now, we are working more and more on reporting. Reporting involves GROUP BY .

We are noticing (without testing every data type) that if we use SUM(field) COUNT(field) in a GROUP BY, that if the field is not declared as a FLOAT, we get a NULL or VOID
result in the cursor.

As a result, we are changing our database schema so that all fields that are SUM'med or COUNT'ed in a GROUP BY ... are now stored in Valentina as FLOAT.

Then, we are scouring our programs to convert to FLOAT before a store in the database.

Once we have made this change, there is no reason to go back, as this would mean that moving from FLOAT to ULONG on deployed software would require update routines.
We do not feel that our converting to FLOAT represents any problem, other than some minor slow-down as a result of type-casting within the code.

But ... for new products we are soon to roll out, we would like to use other data types (other than FLOAT) for data, where the fields will be involved in GROUP BY Summation and other 
aggregate functions.

Is it possible for more testing to be done with aggregate functions and GROUP BY ... on data-types other than FLOAT ?
Is this a problem with what we are doing, or is there an actual issue with aggregate functions and GROUP BY cursors ?

Thank you.

Best Regards,
Gunnar Swan
http://www.PracticeToPass.Com
Software Built For Statutory Courses




More information about the Valentina mailing list