Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_RANDOM package with negative random numbers ??
On 31 May 2002 09:33:38 -0700, rolf.unger_at_ctilabs.de (Rolf Unger)
wrote:
>has anybody experience with the package DBMS_RANDOM
>on Windows NT?
I'm not sure about the type conversions, but in my own code to get a random number from 1..N, I find the expression
(1+abs(mod(dbms_random.random,N)))
suggesting that you do need to ignore the sign.
John
-- Got an Oracle database question? Try the search engine for the database docs at: http://tahiti.oracle.com/ The opinions expressed above are mine and do not necessarily reflect those of Oracle Corporation.Received on Fri May 31 2002 - 12:09:36 CDT