For what i see is why not returning the record u wish to take by specify the distinct value using where condition?
: ok here's my problem:
:
: i need to write some sql code for a game ranking.
: there are pretty many ppl in it so it has to be fast
:
: tried to move within ADO to the startrow and then select as many as i need per page but this is taking too long
:
: rs.Move pagesize*(page-1)+1
: for i=1 to pagesize
: .
: .
: .
:
: so is there any way within TSQL to determine the position of a row from within an sql statment
:
: e.g. select @@row_position, * from ranking ?
:
: or any similar solution you may think of? of course i could use a temporary table but this would be slow again, as far as i'm concearned
:
: my current approach is fast but doesn't work with equal ranking scores:
:
: select top pagesize from ranking where score > (select top pagesize*(page-1)+1 scores from ranking)
:
: help would be appriciated,
:
: sincerly yours
:
: thomas K
:
Neo Gigs
http://communities.msn.com.my/VisualBasicwithNeo