Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Randomfunction

Status
Not open for further replies.

simmeone

Programmer
Mar 16, 2000
29
0
0
DE
Hi,<br><br>one question: how I can create a Randomfunction with the DBMS_RANDOM Utility?? At the moment I'm a little bit clueless.<br><br>Thank you very much for your help.<br><br>SiM
 
1st of all dbms random is not a utility it is package supplied only with oracle 8.<br>there are four methods <br>1) initialize:&nbsp;&nbsp;&nbsp;initilize the random number genrator with seed value.<br>2) random:&nbsp;&nbsp;&nbsp;&nbsp;returns a random number.<br>3) seed:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rset the seed number used to genrate the seed number.<br>4) terminate: terminates&nbsp;&nbsp;the random number genrator mechanism<br>note : donot use in sql.<br>usage not :<br>&nbsp;exec dbms_random.initialize(309666789);<br>&nbsp;use this method with at least 5 numbers.<br>&nbsp;<br>&nbsp;exec dbms_random.seed(455663349);<br><br>&nbsp;declare <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my_random binary_integer;<br>&nbsp;begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my_random := dbms_random.random;<br>&nbsp;end;<br><br>&nbsp;exec dbms_random.terminate;<br>i hope that will help <p>imran tariq thanvi<br><a href=mailto:ithanvi@hotmail.com>ithanvi@hotmail.com</a><br><a href= >dba</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top