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.

 All Forums
 Old Forums
 CLOSED - SQL Server 2005/Yukon
 Finding the nth row in a table using sqlserver 2005

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-01-19 : 08:36:27
suneel writes "How to find the nth row in a table using sqlserver 2005"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-19 : 09:01:23
One of the methods
Select min(col) from
(
Select Top N col from yourTable Order by col DESC
) T

Also you need to define what nth row means in your case


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

deostroll
Starting Member

1 Post

Posted - 2007-02-25 : 01:57:12
But what we had a non-relational table?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-02-25 : 02:26:12
quote:
Originally posted by deostroll

But what we had a non-relational table?



Who cares? It's just a job interview question.


CODO ERGO SUM
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-25 : 07:48:54
And where is the "relational" thingies with Madhis suggestion?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -