|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
select top 10
contactid,company,fname,lname from tblcorecontacts where lstedited <= getdate() order by lstedited desc |
|
#3
|
|||
|
|||
|
the best!
r937,
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!! |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Return specific amount of records |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|