best strategy for histogram preparation

Franco Vaccari vaccari at units.it
Fri Jul 12 07:54:30 CDT 2013


This sounds similar to what I'm currently doing, one select for each range of m1, and counting the records of the resulting cursors, isn't it?

Ciao

Franco

On Jul 12, 2013, at 2:13 PM, Beatrix Willius <bwillius at gmx.de> wrote:

> I sometimes need to do this in Excel. Then I write a simple formula for what you want to do with SQL.
> 
> In pseudo-code
> 
> if m1 >=5 and m1 < 5.5 then
> 	result = 1
> elseif m1 >= 5.5 and m1 < 6 then
> 	result = 2
> 
> and so on. 
> 
> HTH
> 
> On 12.07.2013, at 12:45, Franco Vaccari <vaccari at dst.units.it> wrote:
> 
>> I'd like to ask what is the best strategy to extract data from a database for producing a histogram. I'm using Xojo ADK.
>> 
>> The way I do it now is to call  SQLselect  in a loop to extract subsets of data and count the records of each subset (see the part // loop over histogram classes in the code below). For histograms made on the values stored in field M1, statements in the loop come out like this:
>> 
>>>>>> 
>> select recID,M1,catLink from "Data" where "catLink" = 6 and "M1" >= 5 and "M1" < 5.5
>> select recID,M1,catLink from "Data" where "catLink" = 6 and "M1" >= 5.5 and "M1" < 6
>> select recID,M1,catLink from "Data" where "catLink" = 6 and "M1" >= 6 and "M1" < 6.5
> 
> Mit freundlichen Grüßen/Regards
> 
> Trixi Willius
> 
> http://www.mothsoftware.com
> Mail Archiver X: The email archiving solution for professionals
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list