• I wrote an article about the problem in 2006. Besides the solution with table function, look at the third solution: http://www.sql-server-performance.com/articles/dba/list_random_values_p1.aspx