Thread: oidrand question

oidrand question

From
Darren Greer
Date:
Hello again all.  First I would like to thank all those who helped me with the
multiple select statement.  Thanks to your help, it is working fine.

I am in the process of using oidrand inside of a select statement.  However, I
am noticing some wierd results when I feed certain numbers in.  Here is a
sample select statement.
select * from listeners where station = 'KKLS' and oidrand(oid, 2);

This returns, as expected, about 50% of the results.  Another:select * from listeners where station = 'KKLS' and
oidrand(oid,3);
 

This return about 33%.

Now lets say that I want to get 75% of the results.  I would put 1.333 in
there, but it does not return 75%, it return 100%.  This tells me that this is
rounding to the nearest whole number.  If so, how does one get say 75% of the
results?

Thanks,

Darren