Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Location
    Indai
    Posts
    11

    Arrow Unanswered: Random Number generation

    hi all,

    In Sql Server 7 How can I make random Numbers(the no which i specified) under a specific limit.
    for eg:- 100,6
    I need 6 random numbers between 1 to 100.
    pls help out

  2. #2
    Join Date
    May 2002
    Posts
    25
    here's a start

    SELECT RAND( (DATEPART(mm, GETDATE()) * 100000 )
    + (DATEPART(ss, GETDATE()) * 1000 )
    + DATEPART(ms, GETDATE()) )

Posting Permissions

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