Dynamic Order By in ROW_NUMBER()
How to do order by in your paging using ROW_NUMBER() feature on SQL Server 2005 SELECT a.CurrentPrice, a.LotQuantity, a.IsAuction, a.AuctionID, a.AuctionName, a.DateStart, a.DateFinish, a.StartingPrice, a.ReservePrice, a.FixedPrice, a.BidIncrement, p.ProductID, p.CategoryID, p.BrandID, p.ProductName, p.ContentID, p.ThumbImageID, Row_Number() OVER (…