View Single Post
  #4  
Old 12-19-2007, 04:43 AM
srikumar_l srikumar_l is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 196
srikumar_l is on a distinguished road
Default Re: Retrieve only the Nth row from a table?

Hi Santha,

I think this will help you ,

Begin
With ProjectTable As
(Select *, Row_Number()Over(Order By ProjectID) as RowNum from Project)
Select * from ProjectTable Where RowNum = 9
End

Here the 'ProjectTable' is the Common Table Expression used to hold the result set of the project table temporarily.
You can use any table instead of project table.

Tell me How usefull was it

Thanks,
L.Srikumar
Reply With Quote