Solved

SQL server

Posted on 2007-12-03
4
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 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