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 |
|
Ach
Starting Member
13 Posts |
Posted - 2005-09-25 : 09:03:13
|
| Hi, I want to return the next row in a select ... order by ... cursor.I don't want to loop,just SQL,Do you know any solution? For example: in Oracle we use rownum,is there any equivalent in SQL Server? -Thanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-26 : 00:49:25
|
If you want to get eight row by ascending order of the keycolumn thenSelect Top 1 columns from ( Select top 8 columns from yourTable order by KeyCol Asc )T order by keycol Desc MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|