Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    14

    Unanswered: Creating Ranadom numbers

    Hi all,

    I am creating Stored Procedure for Random number generation.For that store procedure i am giving input as
    create or replace Procedure random_num(start_no,end_no,no)
    example ,random_num(1,100,6) Then the out put should be 6 random numbers between 1 and 100. I am finding difficulty for writing this. Any one can help.Waiting for your reply.

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    You could use DBMS_RANDOM and then scale the number appropriately between your start and end values.

    Alan

  3. #3
    Join Date
    Aug 2003
    Posts
    3
    what's the DBMS_RANDOM ? WHERE IS THE DBMS_RANDOM ?

    waiting for your reply.thanks


    changliang

  4. #4
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    Try the Supplied PL/SQL Packages Reference on technet. I think DBMS_RANDOM came in with 8i.

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •