Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cardgunner
326 Posts |
Posted - 2008-02-29 : 08:54:59
|
My company has requested me to give them the top 20 customers in our database. Now problem I can do that.Next week they are going to ask me for the the next 20. I could count down or put it in an excel and count the rows. However that that is not a great solution.Is there a statement that says top 20 to 30? orIs there a way to assign a temp ranking to the records and then I could select use tmp.rank between 20 and 30?I hope this makes sense?Card Gunner |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-29 : 08:56:32
|
Add identity column to the table, then you can query range of records using identity column.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
cardgunner
326 Posts |
Posted - 2008-02-29 : 09:07:30
|
Identity column? I will search to find out what this is cause it sounds right.However when you say add to the table the temp table right?Card Gunner |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|