select top 30 percent * from [table_name] ORDER BY NEWID()
select 30% of records of last month
select top 30 percent * from[table_name]
and DatePart(""m"", date_created) = DatePart(""m"", DateAdd(""m"", -1, getdate()))
AND DatePart(""yyyy"", date_created) = DatePart(""yyyy"", DateAdd(""m"", -1, getdate()))
ORDER BY NEWID()
Monday, September 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment