Do you want to select a random row from an SQL Query?
If so, and you are using SQL Server, try:
Code:
SELECT TOP 1 yourcolumn1, yourcolumn2, ...
FROM yourtable
ORDER BY NEWID();
The NEWID() function generates a GUID for each row in your query. Guids are random, unique values, so ordering the results of your query by this random number and then selecting just one row gives you one random row from the entire query.
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com