Solved

SQL server

Posted on 2007-12-03
4
174 Views
Last Modified: 2010-03-19
How do I select the BOTTOM x number from a list?

Selet top works...not bottom
0
Comment
Question by:lrbrister
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
QPR earned 500 total points
ID: 20399674
select the top but order by something desc

select top 50 *
from mytable
order by idnumber desc
0
 

Author Comment

by:lrbrister
ID: 20400077
QPR:
Doesn't taht still give me the top 50 of x million but inn descending order?
0
 
LVL 25

Expert Comment

by:imitchie
ID: 20400193
lrbrister:
that will select the TOP 50 from the BOTTOM upwards... i.e. BOTTOM 50
0
 
LVL 29

Expert Comment

by:QPR
ID: 20400314
nope because you are asking for the id (or some other sequential value) in descending order you will get the bottom 50
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now