> There were a couple typos, but it works rather nicely.  Try
> 
> SELECT *
> FROM (
> SELECT TOP 20 *
> FROM (SELECT TOP 220 *
> FROM table C
> ORDER BY C.column ASC) B
> ORDER BY B.column DESC ) A
> ORDER BY A.column ASC

Ahh I see, I put the * infront of TOP
Also, you probably want to put this as a stored procedure and pass in the
parameters

@curentPage INT,
@rowPerPage INT

SELECT *
FROM (
SELECT TOP 20 *
FROM (SELECT TOP ( ( @rowPerPage * @curentPage ) + @rowPerPage )
yourColumn1, yourColumn2
FROM yourTable C
ORDER BY C.yourOrderColumn ASC) B
ORDER BY B.yourOrderColumn DESC ) A
ORDER BY A.yourOrderColumn ASC


Taco Fleur - Pacific Fox
an industry leader with commercial IT experience since 1994 .
http://www.pacificfox.com - Web Design and Development


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219537
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to