RE: Query Help - Random Records

RE: Query Help - Random Records

 

  

Hi Mindy,

the following query will return a different, random set of records each time
it is run. you do not need to include the newid() function in the field
list.


Select Top 412 [columnlist]
from your table
order by newid()


Database Administrator
United States Liability Insurance Group
190 S. Warner Rd.
Wayne, Pa 19087-2191

1.888.523.5545 x191
Fax 610.688.4319
[Email address protected]

Alternate Contacts:
Kevin Howell (DBA)
[Email address protected]
x549

Ben Lowry
[Email address protected]
x309


Ability is what you're capable of doing. Motivation determines what you do.
Attitude determines how well you do it.
Lee Holtz



MS Sql Server LazyDBA home page