[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Getting an Oracle random number from SQR
- Subject: Getting an Oracle random number from SQR
- From: Bill Smith <whsmith@SRPNET.COM>
- Date: Fri, 17 Aug 2001 16:53:19 -0700
I'm trying to use the Oracle DBMS_RANDOM package to generate a random number
and return it to an SQR variable. I've tried the sample code I've found in
the SQRUG library without any luck. Any help in correcting the following
code would be appreciated:
begin-procedure get_rand
begin-sql
call DBMS_RANDOM.initialize(TO_NUMBER(TO_CHAR(SYSDATE, 'SSSSS')));;
#rand := DBMS_RANDOM.random;;
end-sql
move #rand to $rand 009
end-procedure get_rand