Solved

SQL server

Posted on 2007-12-03
4
156 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article I will describe the Copy Database Wizard 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.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

22 Experts available now in Live!

Get 1:1 Help Now