From: | Darren Greer <dgreer(at)websightsolutions(dot)com> |
---|---|
To: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | oidrand question |
Date: | 1999-06-23 11:54:20 |
Message-ID: | 9906230705310F.13060@george |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | José Soares | 1999-06-23 13:56:59 | Re: [SQL] Are int4/int8 ops defined? |
Previous Message | Haris Susanto | 1999-06-23 04:39:21 | insert on insert/update |