SELECT TOP 10 * 
FROM dbo.Objects_tbl with (nolock) 
where 
 Objects_tbl.ObjectClass='DS'
 AND Objects_tbl.ProcStateCol09 IN ('M')
 AND Objects_tbl.ObjectFromSiteID IN ('tceng')
 And Objects_tbl.ObjectOwningSiteID='tceng'
 And Objects_tbl.ObjectUgMaster_Type = 'AP'
 AND Objects_tbl.ObjectType IN ('UGMASTER')
 And  Objects_tbl.ObjectUgMaster_CompCount<=6000
 And  Objects_tbl.ObjectUgMaster_CompCount>=0
 AND (Objects_tbl.ObjectGroup LIKE 'D%' OR  Objects_tbl.ObjectGroup LIKE 'Y%')
 And Objects_tbl.ObjectLastModDate <= Convert(datetime,'2006-01-31 23:59:00',120)
 And Objects_tbl.ObjectLastModDate >= Convert(datetime,'2006-01-31 23:59:00',120)
 ORDER BY
 Objects_tbl.ObjectUgMaster_APLevels ASC, 
 Objects_tbl.ObjectUgMaster_CompCount ASC, Objects_tbl.ObjectCreateDate DESC


