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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Get 3rd record

Author  Topic 

Nowy
Yak Posting Veteran

57 Posts

Posted - 2007-05-30 : 05:17:30
How to get 3rd record? In MySQL I used the LIMIT function but this doesn't work in MS2000

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-05-30 : 05:24:42
based on what..post some sample data

--------------------------------------------------
S.Ahamed
Go to Top of Page

Nowy
Yak Posting Veteran

57 Posts

Posted - 2007-05-30 : 05:31:08
in MySQL I used the following query

SELECT RecordID FROM tblSupport LIMIT 2,1

how can I do the same in MS2000?
Go to Top of Page

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-05-30 : 05:37:16
U have to use TOP

Select Top 3 * from <ur table name>

--------------------------------------------------
S.Ahamed
Go to Top of Page

Nowy
Yak Posting Veteran

57 Posts

Posted - 2007-05-30 : 05:44:30
ok but it gives 3 records, I only want the 3rd record
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-30 : 06:21:39
Define 3rd record

Select
min(col) as col
from
(
Select top 3 col from table order by col DESC
) T


Madhivanan

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

Nowy
Yak Posting Veteran

57 Posts

Posted - 2007-05-30 : 07:06:51
thnx
Go to Top of Page
   

- Advertisement -