January 10th, 2004, 10:00 PM
Return specific amount of records
Some help would be greatly appreciated:
I have a select statement:
select contactid,company,fname,lname from tblcorecontacts where lstedited <= getdate()
I am missing the means to restrict records to 10.
I have a asp page that is to show the last 10 records (or no more than) of contacts that have been modified.
So, what I'm saying is please helpme to add to my select statement to use the count or other function to stop showing records when they are >= 11
Any help would be much appreciated.
January 10th, 2004, 10:19 PM
select top 10
where lstedited <= getdate()
order by lstedited desc
January 10th, 2004, 10:33 PM
your the best!
It worked great, I wasn't aware of the top command.
You just solved a big problem for me.
Thanks a million!!