random records (sql)

Results 1 to 2 of 2

Thread: random records (sql)

  1. #1
    mark Guest

    Default random records (sql)

    Hi, <BR><BR>I&#039m trying to use the following query to select two random records from my database. Do you have any ideas of why the recrand field will not change? I am using MS Sql server 7.. Please email mark@dtdesign.com ..Cheers Mark<BR><BR>SELECT TOP 2 mytable.id AS RECID, RAND(mytable.id) AS recrand<BR>FROM mytable<BR>ORDER BY recrand<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: random records (sql)

    For a script to return a random number of random database records, check out:<BR>http://www.4guysfromrolla.com/webtech/102999-1.shtml<BR><BR>This should help you out! :-)<BR><BR>Happy Programming!

Posting Permissions

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