|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help with RAND()I have the following query:- SELECT DISTINCT TOP 10 PERCENT dbo.tbl_cleaning_visits_internal.cvi_id, dbo.tbl_main.m_internal_block_type FROM dbo.tbl_supervisor_block_pre LEFT OUTER JOIN dbo.tbl_main INNER JOIN dbo.tbl_cleaning_visits_internal ON dbo.tbl_main.m_ib_id = dbo.tbl_cleaning_visits_internal.cvi_ib_id LEFT OUTER JOIN dbo.tbl_supervisor_block_post ON dbo.tbl_cleaning_visits_internal.cvi_id = dbo.tbl_supervisor_block_post.sbp_cvi_id ON dbo.tbl_supervisor_block_pre.sbp_cvi_id = dbo.tbl_cleaning_visits_internal.cvi_id I want the top 10 percent which are retrieved to always be randomly selected every time it's run. Is this possible? Appreicate any help on this Thanks Damon |
|||||||||||||||||||||||