Hi yet again Pierre,

Ok, I did a test where I used the limit of 48 out of 49 records.
It didn't pick even one duplicate.  Hurray!!!  The code must
advance the record counter randomly so no duplicates
occur.  Nice, but unexpected.

Ok, all is well now.

Thanks again,

Rick

On Feb 2, 2011, at 9:41 PM, Rick Harrison wrote:

> Hi again Pierre,
> 
> How do I avoid picking duplicates though?
> 
> Rick
> 
> On Feb 2, 2011, at 6:09 PM, Pierre Sahores wrote:
> 
>> Hi Rick,
>> 
>> SELECT *
>> FROM table
>> WHERE condition = true
>> ORDER BY hashfloat8(random())
>> LIMIT 10;
>> 
>> Are you sure that the order by + limit clauses used together can't suit 
>> exactly your needs ?
>> 
>> Best,
>> 
>> Pierre


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to