Hmmmm,
Not sure if there is any method for this in MS SQL, but the SQL forums may be able to help with that.
If I was to do this in ASP I would probably load an array with all the primary keys in the table.
Then randomly select the array index.
This is my fisrt though on this, others may have better way.
Or count the records, then randomly select an int between 1 and the count and iterate through the key recordset the random number of times, then that is your random PK.
Basically the same just skips the array.
Rod
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
|